PL/I metamodel

ABSTRACT

A method of and a system for processing an enterpise an application request on an end user application and an application server. This is accomplished by initiating the application request on the end user application in a first language (such as a markup language) with a first application program (such as a Web browser), and transmitting the application request to the server and converting the application from the first language of the first end user application to a language running on the application server, processing the application request on the application server, and transmitting the response from the application server back to the end user application, and converting the response from the language running on the application server to the language of the end user application. The end user application and the application server have at least one connector between them, and the steps of (i) converting the application request from the language of the end user application (as a source language) to the language running on the application server (as a target language), and (ii) converting the response to the application request from the language running on the application server (as a source language) to the language of the end user application (as a target language), each include the steps of invoking connector metamodels of the respective source and target languages, populating the connector metamodels with metamodel data of each of the respective source and target languages, and converting the source language to the target language.

FIELD OF THE INVENTION

[0001] The invention relates to exchanging instructions and/or databetween applications to signal readiness to transfer, exchange, orprocess data, or to establish at least one or more parameters fortransferring data between the applications, and controlling theparameters in order to facilitate data transfer and communication. Theinvention further relates to integrating dissimilar applications oneexecuting within one platform and another executing in another platform,e.g., multiple computers, multiple operating systems, multipleapplication components, multiple development environments, multipledeployment environments, or multiple testing and processing,establishing a dialog (e.g., a negotiation) with one another in order toestablish connectivity for transferring data and/or instructions betweenthe applications so as to facilitate performing tasks on the data orportions thereof to accomplish an overall goal. The parameters mayinclude one or more of format, data types, data structures, or commands.

BACKGROUND

[0002] The growth of e-business has created a significant need tointegrate legacy applications and bring them to the Internet This isbecause the current trend for new applications is to embrace Webstandards that simplify end user application construction andscalability. Moreover, as new applications are created, it is crucial toseamlessly integrate them with existing systems while facilitating theintroduction of new business processes and paradigms.

[0003] Integrating new applications with existing applications isespecially critical since industry analysts estimate that more thanseventy percent of corporate data, including data highly relevant toe-commerce, lives on mainframe computers. Moreover, while manye-commerce transactions are initiated on Windows, Mac, and Linux enduser platforms, using a variety of Web browsers, and go through WindowsNT and Unix servers, they are ultimately completed on mainframecomputers, running mainframe applications, and impacting data stored inmainframe databases.

[0004] There are e-business pressures to integrate server levelapplications and bring them to the Internet. However, there is nocomplete and easy mechanism to integrate or e-business enable theapplications. Integration, whether through messaging, procedure calls,or database queries, is key to solving many of today's businessproblems.

[0005] Integrating legacy applications with new software is a difficultand expensive task due, in large part, to the need to customize eachconnection that ties together two disparate applications. There is nosingle mechanism to describe how one application may allow itself to beinvoked by another.

[0006] One consequence is an e-commerce environment of multipleapplications, developed by multiple development teams, running ondifferent platforms, with different data types, data structures,commands, and command syntax's. This environment is stitched togetherwith application program interfaces and connectors. Connectors are anessential part of the total application framework for e-commerce.Connectors match interface requirements of disparate applications andmap between disparate interfaces.

[0007] This growing interconnection of old and new software systems andapplications, has led to various middle ware applications and connectorapplications, interface specifications, interface definitions, and code,especially for the interconnection and interaction of markup languages(such as HTML, XML, Dynamic HTML, WML, and the like), through objectoriented languages such as SmallTalk and C++, with languages of legacyapplication server applications (such as PL/I and COBOL). Theseinterface specifications, definitions, and code should apply acrosslanguages, tools, applications, operating systems, and networks so thatan end user experiences the look, feel, and responses of a single,seamless application at her terminal. Instead, the proliferation ofstandards, protocols, specifications, definitions, and code, e.g.,Common Object Request Broker (CORBA), Common Object Model (COM), ObjectLinking and Embedding (OLE), SOM, ORB Plus, Object Broker, Orbix, hasinstead created an e-commerce “Tower of Babel.”

[0008] Examples of application integration are ubiquitous: frominstalling an ERP system, to updating an Operational Data Store (ODS)with IMS transactions or invoking CRM systems from MQSeries; each ofthese requires the same basic steps. First, a user must find the entityshe wants to communicate with, then she must figure out how to invokethe entity, and finally she must provide translation from one nativerepresentation to another. Today, these steps usually require manualinvestigation and hand coding—and leave the developers with a rat's-nestof hard-to-maintain connections between applications.

[0009] Attempts to remedy this situation involve application programinterfaces and connectors, which are frequently built on InterfaceDefinition Languages. Interface Definition Languages are declarative,defining application program interfaces, and, in some cases, issues suchas error handling. Most Interface Definition Languages are a subset ofC++, and specify a component's attributes, the parent classes that itinherits from, the exceptions that it raises, the typed events that itemits, the methods its interface supports, input and output parameters,and data types. The goal of Interface Definition Languages withinconnectors is to enable collaboration between dissimilar applicationswithout hard coded application program interfaces.

[0010] Ideally, the interface definition language, and the connector ofwhich it is a part, should facilitate full run-time software applicationcollaboration through such features as

[0011] Method invocation with strong type checking,

[0012] Run-time method invocation with greater flexibility and run timebinding,

[0013] High level language binding, with the interface separated fromthe implementation.

[0014] An interface repository containing real time information ofserver functions and parameters.

[0015] Additionally, the connector and its interface definitionlanguage, should be fast, efficient, scalable, portable, supportmetaclasses, support syntactic level extensions, and support semanticlevel extensions.

SUMMARY OF THE INVENTION

[0016] The problems associated with integrating new applications, forexample, e-commerce applications, with legacy applications are obviatedby the Common Application Metamodel tool, method, and system describedherein. The Common Application Metamodel method, tool, and system of theinvention facilitate tooling solutions, data translation, andcommunication and collaboration between dissimilar and disparateapplications, as well as full run-time software applicationcollaboration through an interface with the application server interfacedomain. This is accomplished through metadata interchange information,method invocation with strong type checking, run-time method invocation,run time binding, and high level language binding, with the interfaceseparated from the implementation, and an interface repositorycontaining real time information of client and server interfaceparameters.

[0017] Additionally, the tool, method, and system of the inventionprovide fast, efficient, and scalable interconnectivity independently ofany tool or middleware, are reusable and portable, and supportmetaclasses, syntactic level extensions, and semantic level extensions,and are independent of any particular tool or middleware.

[0018] The Common Application Metamodel tool, method, and system isespecially useful for providing a data transformer that isbi-directional between a client application and a server application,transmitting commands and data both ways between, for example, a Java,HTML, XML, C, or C++ application and a PL/I application.

[0019] One embodiment of the invention is a method of processing atransaction on or between an end user application and one or moreapplication servers. The method comprises the steps of initiating thetransaction on the end user application in a first language with a firstapplication program, transmitting the transaction to the server, andconverting the transaction from the first language of the first end userapplication to a language running on the application server. Typically,as described above, the client will be a thin client or a Web browser,the application running on the client will be a Web browser applicationor a thin client connectivity application, and the language of theclient application will be Java, C, C++, or a markup language, as HTMLor a derivative of HTML, such as XML or Dynamic HTML or WML, or thelike, and the language running on the server is PL/I. The inventionfacilitates transformers which convert the transaction from the firstlanguage of the end user application to a language running on theapplication server. After conversion, the converted transaction isprocessed on the application server.

[0020] The application processes the request and then sends the responsefrom the application server back to the end user application. Typically,as described above, the application server will be running a PL/I basedapplication, and the client will be a thin client written in Java or Cor C++, or a Web browser, running a Web browser application or a thinclient connectivity application, in a markup language, as HTML or aderivative of HTML, such as XML or Dynamic HTML, or the like. Theinvention provides data transformers which convert the response from thelanguage or languages running on the application server or servers tothe first language of the first end user application.

[0021] The end user application and the application server have at leastone data transformer between them. In this way, the steps of (i)converting the request from the first language of the first end userapplication as a source language to the language running on anapplication server as a target language, and (ii) converting theresponse from the language running on the application server, as asubsequent source language, back to the first language of the first enduser application, as a subsequent target language, each comprise thesteps of invoking type descriptor and language metamodels of respectivesource and target languages, populating the metamodels with each of therespective source and target languages' data items and types, andconverting the source language to the target language.

[0022] The end user application is, frequently, a web browser or a thinclient. When the end user application is a Web browser, the end user isconnected to the application server through a web server. According to afurther embodiment of the invention, the web server may comprise theconnector, or data transformer. The data transformer integrated with theWeb server may directly convert the request, transaction, or messagefrom a browser oriented form to an application server language or to anintermediate, business or commerce oriented markup language, such asXML.

[0023] The CAM metamodel used to construct the converter comprises aninvocation metamodel, an application domain interface metamodel, alanguage metamodel, and a type descriptor metamodel. Exemplaryinvocation metamodel includes information chosen from the groupconsisting of message control information, security data, transactionalsemantics, trace and debug information, pre-condition and post-conditionresources, and user data, etc. Exemplary application domain interfacemetamodel comprises information chosen from input parameter signatures,output parameter signatures, and return types. Application domaininterface metamodel uses one or more language metamodels, such as COBOLand PL/I metamodels.

[0024] The type descriptor metamodel defines physical realizations,storage mapping, data types, data structures, and realizationconstraints.

[0025] The method of the invention is applicable to situations where oneof the source or target languages is object oriented, and the other ofthe target or source languages is not object oriented. In thissituation, the language metamodel and the type descriptor metamodeltogether map encapsulated objects of the object oriented language intocode and data of the language that is not object oriented. Additionally,the language metamodel and the type descriptor metamodel maps objectinheritances of the object oriented language into references andpointers in the language that is not object oriented. The method of theinvention is also applicable to situations where different objectoriented languages are running on different platforms, and encapsulatedobjects of the source language (code and data) are mapped intoencapsulated objects of the target language. The method of the inventionis also applicable where different procedural languages are running ondifferent platforms or applications and commands and data of the sourceprocedural language are mapped into the target procedural language.

[0026] According to the method of the invention, there may be aplurality of applications for vertical (sequential, conditional, ordependent) processing, for horizontal (parallel in time) processing, orboth horizontal and vertical processing. This is to support richtransactions to and through multiple hierarchical levels and multipleparallel sequences of processing. This may be the case in business tobusiness transactions drawing upon financial, manufacturing, scheduling,supply, and shipping databases and servers, and utilizing variouscommercial security instruments.

[0027] A further aspect of the invention is a client-server processingsystem having a client, a server, and at least one transformer betweenthe client and one or more servers,

[0028] A still further aspect of the invention is a processing systemconfigured and controlled to interact with a client application. In thisaspect of the invention, the system comprises, a server, and at leastone transformer between the server and the client application, where theclient has an end user application, and is controlled and configured toinitiate a request with the server in a first language with a firstapplication program and to transmit the request through a transformer tothe server or servers. The server processes the request in a secondsoftware application, using a second language, and returns a response tothe client through a transformer.

[0029] A further aspect of the invention is a groupware system having aplurality of e-mail enabled end user applications, such as e-mail, wordprocessing, spreadsheet, simple database management (such as LotusApproach or Microsoft Access), graphics and graphics editing, audio andaudio editing, and computer-telephony integration (“CTI”), along withclient level content database client services and content replicationclient services. Groupware integrates these e-mail enabled applicationsthrough one or more transformers and application program interfaces withtransport services, directory services, and storage services, includingcontent servers and replication servers. The groupware system isconfigured and controlled to communicate among disparate end userapplications, among disparate servers, and between disparate servers andend user applications. The groupware system comprises at least onetransformer between a server and an end user application. The end userapplication is controlled and configured to participate with a server ina first language of a first application program and the server isconfigured and controlled to participate with the client in a secondlanguage of a second program.

[0030] The transformer is configured and controlled to receive a requestfrom the end user application, and convert the request from the firstlanguage of the first end user application to a language running on theserver. The server is configured and controlled to receive the convertedrequest from the transformer and process the request in a secondlanguage with a second application program residing on the server, andto thereafter transmit a response through a transformer back to the enduser application.

[0031] A still further embodiment of the invention is the provision ofrich transaction processing. Rich transactions are nested transactionsthat span to, through, and/or across multiple servers. The spanningacross nested servers may be horizontal, that is parallel dependenttransactions, or vertical, that is, serial dependent transactions. Richtransactions may be long lived, on-going transactions, or complexbusiness-to-business transactions, especially those with multipledependencies or contingencies, volume and prompt payment discounts, latedelivery and late payment penalties, and with financial processing, suchas electronic letters of credit, electronic bills of lading, electronicpayment guarantees, electronic payment, escrow, security interests inthe goods, and the like. In a rich transaction environment, sometransaction servers may be positioned as clients with respect to othertransactions for certain sub transactions making up the richtransaction.

[0032] A still further embodiment of the invention is a tool, that is, asoftware developer's kit, characterized in that the program product is astorage medium (as a tape, floppy disks, a CD-ROM, or a hard drive orhard drives on one of more computers) having invocation metamodels,application domain interface metamodels, and language metamodels, andcomputer instructions for building a metamodel repository of source andtarget language metamodels. The program product also contains computerinstructions for building connector stubs from the metamodels. Theprogram product further carries computer instructions to build atransformer.

[0033] While the invention has been described in summary form as havinga single level of connectors, it is, of course, to be understood thatsuch connectors may be present at various levels in the processinghierarchy, for example between Web Clients and Web servers, between webservers and application servers, between application servers anddatabase servers, and between application servers or database servers orboth and various specialized repositories.

[0034] It is also to be understood, that while the invention has beensummarized in terms of individual clients and individual servers, theremay be multiple clients, multiple servers, and applications thatfunction as both clients and servers, as exemplified by groupwareapplications, and there might be multiple parallel lines and/or multiplehierarchical levels of application servers, data servers, and databases,as in systems for rich transactions.

THE FIGURES

[0035] Various elements of the invention are illustrated in the FIGURESappended hereto.

[0036]FIG. 1 illustrates a system with multiple application components,including a Netscape Internet Explorer browser, Net.Commerce on a SunSolaris server, Oracle and DB2 on a database server, SAP running on AIX,a CICS 390 server, an IMS 390 server, DB2 and DL/I on a S/390 platform,a Windows 200 client, and Baan running on an HP Unix server.

[0037]FIG. 2 illustrates the roles of message sets, SQL storedprocedures, legacy applications, and programming languages as inputs tothe metadata repository of the Common Application Metamodel tofacilitate enterprise application integration at run time.

[0038]FIG. 3 illustrates that the Common Application Metamodel of theinvention consists of three kinds of metamodels, i.e., an invocationmetamodel, an application-domain interface metamodel, and a languagemetamodel. For any given application-domain metamodel it may use one ormany language metamodels, and there could be zero or many invocationmetamodels.

[0039]FIG. 4 illustrates an IMS OTMA metamodel, with an OTMA InvocationMetamodel, an IMS Transaction Message Metamodel application interface,which could use a COBOL Metamodel, a C Metamodel, or other languagemetamodels.

[0040]FIG. 5 illustrates how a tool can be used to generate an XMLdocument describing application program interface. First, an objectmodel, i.e., a CAM metamodel, is created to capture interfacedefinitions about an application server. Then a tool reads and parsesthe source definitions of an application program and generates an XMLdocument by retrieving the object model's information from a repository.

[0041]FIG. 6 illustrates a development phase scenario where a CommonApplication Metamodel Rose file, e.g., a COBOL metamodel, a PL/Imetamodel, an MFS metamodel, a BMS model, or the like is read into atoolkit, to generate a DTD and XML schema and Java code for a Rosemodel. A source file of an application, as a COBOL source file, a PL/Isource file, an MFS source file, a BMS source file, or the like, is readinto an importer. The importer parses the source code and generates, asoutput, an XMI instance file, i.e., XML documents, by reading in theJava code of the Rose model of the application source files.

[0042]FIG. 7 illustrates a metamodel for application interfaces, whichenables integration of application components into an event basedmessaging model, including flow models. The flow and messaging middleinvokes applications through the application interface. These interfacesare access points to the applications through which all input and outputis connected to the middleware. The interfaces are described in terms ofthe Application Interface Metamodels. Transformation processingaccording to he metamodel could take place in source/clientapplications, target applications, or a gateway.

[0043]FIG. 8 illustrates the application of the Common ApplicationMetamodel during execution time. As shown, the CAM model facilitatesconnectivity between a back-end IMS application and a Web file (e.g.,SOAP complaint XML documents). This is accomplished by using informationcaptured in the model to perform data transformations from one platformto another in a mixed language environment shown.

[0044]FIG. 9 illustrates TDLang base classes, where the Type Descriptormetamodel is used as a recipe or template for runtime datatransformation, with the language specific metamodel for overall datastructures and field names, and without duplicating the aggregationassociations present in the language model.

[0045]FIG. 10 illustrates an MOF class instance at the M2 level as aType Descriptor Metamodel.

[0046]FIG. 11 illustrates the association between a TDLangElement of theTDLang Metamodel with a Platform Compiler Type of the Type DescriptorMetamodel.

[0047]FIG. 12 illustrates various enumeration types for the TypeDescriptor Metamodel, e.g., sign coding, length encoding, floating type,accessor, packed decimal sign, and bitModelPad.

[0048]FIG. 13 illustrates a PL/I language metamodel, which is usable byapplication programs to define data structures which represent connectorinterfaces. This metamodel is an MOF class instance at the M2 level.

[0049]FIG. 14 illustrates the associations between the PL/I metamodelwith the TDLang base classes which are the TDLangClassifier, theTDLanguageComposedType, and the TDLanguageElement for the PL/IMetamodel.

[0050]FIG. 15 illustrates enumerations of Mode Values, Base Values,LengthTypes, and StringTypeValues for the PL/I Metamodel.

[0051]FIG. 16 illustrates a simplified network configuration for a“rich” transaction where, for example, an order is entered at aterminal, and is passed to and through a Web server to a manufacturer'sapplication server. The manufacturer's application server searchesthrough it's own database server, as well as its vendors' dissimilar andincompatible database servers and databases, transparently connected bythe connectors described herein, querying for statuses, prices, anddelivery dates, of components, and placing orders for needed componentsto satisfy the order.

[0052]FIG. 17 illustrates a group ware session spread across multiplegroup ware applications running on multiple, disparate platforms, andconnected using the common application metamodel described herein.

[0053]FIG. 18 illustrates a commercial transaction where real goods areshipped from a seller to a buyer, and various forms of electronicpayment and secured electronic payment are used by the buyer to pay theseller, with banks and financial institutions connected using the commonapplication metamodel described herein.

DETAILED DESCRIPTION OF THE INVENTION

[0054] Definitions. As used herein the following terms have theindicated meanings. “Handshaking” is the exchange of information betweentwo applications and the resulting agreement about which languages,capabilities, and protocols to use that precedes each connection.

[0055] An “application program interface” (API) is a passive specificmethod prescribed by a computer operating system or by anotherapplication program by which a programmer writing an application programcan make requests of the operating system or another application.Exemplary is SAX (Simple API for XML), an connector that allows aprogrammer to interpret a Web file that uses the Extensible MarkupLanguage, that is, a Web file that describes a collection of data. SAXis an event-driven interface. The programmer specifies an event that mayhappen and, if it does, SAX gets control and handles the situation. SAXworks directly with an XML parser.

[0056] A “connector” as used herein is a dynamic, run-time, interfacebetween platforms that stores the functions and parameters of the targetplatform or program, and binds with the target platform program in realtime.

[0057] A “stub” is a small program routine that provides staticinterfaces to servers. Precompiled stubs define how clients invokecorresponding services on the server. The stub substitutes for a longerprogram on the server, and acts as a local call or a local proxy for theserver object. The stub accepts the request and then forwards it(through another program) to the remote procedure. When that procedurehas completed its service, it returns the results or other status to thestub which passes it back to the program that made the request. Serverservices are defined in the stub using an Interface Definition Language(“IDL”). The client has an IDL stub for each server interface that itaccesses and includes code to perform marshaling. Server stubs providestatic interfaces to each service exported by the server.

[0058] “CICS” (Customer Information Control System) is the onlinetransaction processing program from IBM that, together with the CommonBusiness Oriented Language programming language, is a set of tools forbuilding customer transaction applications in the world of largeenterprise mainframe computing. Using the programming interface providedby CICS to write to customer and other records (orders, inventoryfigures, customer data, and so forth) in a CICS, a programmer can writeprograms that communicate with online users and read from a database(usually referred to as “data sets”) using CICS facilities rather thanIBM's access methods directly. CICS ensures that transactions arecompleted and, if not, it can undo partly completed transactions so thatthe integrity of data records is maintained. CICS products are providedfor OS/390, UNIX, and Intel PC operating systems. CICS also allows endusers to use IBM's Transaction Server to handle e-business transactionsfrom Internet users and forward these to a mainframe server thataccesses an existing CICS order and inventory database.

[0059] “IMS” (Information Management System) is the system from IBMthat, together with IBM's Enterprise Systems Architecture (IMS/ESA)provides a transaction manager and a hierarchical database server.

[0060] “MQ” is the MQSeries IBM software family whose components areused to tie together other software applications so that they can worktogether. This type of application is often known as businessintegration software or middleware. Functionally, MQSeries provides acommunication mechanism between applications on different platforms, anintegrator which centralizes and applies business operations rules, anda workflow manager which enables the capture, visualization, andautomation of business processes. MQSeries connects different computersystems, at diverse geographical locations, using dissimilar ITinfrastructures, so that a seamless operation can be run. IBM's MQSeriessupplies communications between applications, and between users and aset of applications on dissimilar systems. Additionally, MQSeries'messaging scheme requires the application that receives a message toconfirm receipt. If no confirmation materializes, the message is resentby the MQSeries.

[0061] “Rose” is an object-oriented Unified Modeling Language (UML)software design tool intended for visual modeling and componentconstruction of enterprise-level software applications. It enables asoftware designer to visually create (model) the framework for anapplication by blocking out classes with actors (stick figures), usecase elements (ovals), objects (rectangles) and messages/relationships(arrows) in a sequence diagram using drag-and-drop symbols. Rosedocuments the diagram as it is being constructed and then generates codein the designer's choice of C++, Visual Basic, Java, Oracle8, Corba orData Definition Language.

[0062] Common Application Metamodel Overview. The Common ApplicationMetamodel (CAM) brings interconnectivity to the environment illustratedin FIG. 1. FIG. 1 illustrates a typical system 101 with multipleapplication components, including a Netscape Internet Explorer browser103, Net.Commerce 105 on a Sun Solaris server 107, Oracle 109 and DB2111 on a database server 113, SAP 115 running on AIX 117, a CICS 390server 119, an IMS 390 server 121, DB2 123 and DL/I 125 on a S/390platform 127, a Windows 2000 client 129, and Baan 131 running on an HPUnix server 133. The Common Application Metamodel (CAM) is metadatainterchange method, tool, and system for marshaling and applyinginformation needed for accessing enterprise applications, such as inFIG. 1, in a source language and converting them to a target language.CAM consists of language metamodels and application domain interfacemetamodels, as shown in FIG. 2, which illustrates the roles of messagesets 203, SQL stored procedures 205, legacy applications 207, andprogramming languages 209 as inputs to the metadata repository 211 ofthe Common Application Metamodel to facilitate enterprise applicationintegration 221.

[0063] Exemplary metamodels include C, C++, Java, COBOL, PL/I, HLAssembler, IMS transaction messages, IMS MFS, CICS BMS, and MQSeriesmessages models, as shown in FIG. 3, which illustrates the CommonApplication Metamodel of the invention, with an invocation metamodel301, an application-domain interface metamodel 303, and a languagemetamodel 305.

[0064]FIG. 4 illustrates an IMS OTMA application interface metamodel411, with an OTMA Invocation Metamodel 421, an IMS Transaction MessageMetamodel 423, a COBOL Metamodel 425, and a C Metamodel 427.

[0065]FIG. 5 illustrates the flow of information from an existingapplication 501, through an interface 503 to an object model containingapplication interface metadata. This application interface metamodel isstored in the metadata repository 505, and, at an appropriate time,retrieved from the metadata repository 505, combined with a sourceprogram 507 in a generation tool 509, and used to generate a target file511, as an XML file, i.e., an XMI instance file. CAM is highly reusableand independent of any particular tool or middleware.

[0066] Development Stage. With CAM, tooling can now easily providesolutions to access enterprise applications, e.g. IMS applications. Byparsing each source file and generating XML documents based on the CAMmodel, COBOL copybook, PL/I copybook, MFS Source, BMS Source, etc.,tools can provide connector solutions to IMS, and CICS, etc.

[0067] In this regard, FIG. 6 illustrates a development phase scenariowhere a Common Application Metamodel Rose file 601, e.g., a COBOLmetamodel, a PL/I metamodel, an MFS metamodel, a BMS model, or the likeis read into a toolkit 603, to generate a DTD and schema for a Rosemodel and Java code for a Rose model 605. A source file of anapplication 607, as a COBOL source file, a PL/I source file, an MFSsource file, a BMS source file, or the like, and the Java code for theRose model 609 are read into an Importer 611. The importer parses thesource code and provides, as output, an XMI instance file 613, i.e., XMLdocuments, of the application source files.

[0068]FIG. 7 shows a CAM metamodel for application interfaces. ThisFigure depicts a runtime connector 701 with invocation andtransformation capabilities, interfacing with an existing applicationprogram 703 through an interface 705 containing the existing applicationprogram's interface definition, in accordance with the applicationinterface metamodel 707. The Application Interface metadata is stored ina metadata repository 709.

[0069] The flow and messaging middleware 713 invokes applications 703through the application interfaces 705. These interfaces 705 are theaccess points to the applications 703 through which all input and outputis connected to the middleware 713. The interfaces 705 are described interms of the Application Interface Metamodel. Transformation processingaccording to the metamodel could take place in source/clientapplications, target applications, or a gateway.

[0070] Because CAM also provides physical representation of data typesand storage mapping to support data transformation in an enterpriseapplication integration environment, it enables Web services forenterprise applications. At development time CAM captures informationthat facilitates:

[0071] a). connector and/or connector-builder tools,

[0072] b). data driven impact analysis for application productivity andquality assurance, and

[0073] c). viewing of programming language data declarations bydevelopers.

[0074] The CAM metamodel files are inputs to toolkits used to generateDTD files, XML schemas, and Java classes which represent the CAM model.Importers parse each source file (e.g. COBOL or PL/I copybook, MFSsource, and BMS, etc.), and then generate XML documents (i.e. XMLinstance files) based on Java classes generated by the XMI/MOF2 toolkit.

[0075] Run Time. At run time CAM provides information which facilitatestransformation in an enterprise application integration environmentwhere it provides data type mapping between mixed languages, facilitatesdata translations from one language and platform domain into another.

[0076]FIG. 8 illustrates the application of the Common ApplicationMetamodel during run time. As shown, SOAP compliant XML documents 803are received in, for example, IBM WebSphere middleware, 805, whichcontains an IMSConnector for Java 807, and is in contact with an XMLRepository 809, containing the XMI instance files for the CAM model. TheIBM WebSphere middleware sends the transformed file to the IMS system811, which contains an instance of IMS Connect 813 and the IMStransactional application program 815. CAM facilitates connectivitybetween the back-end IMS application 815 and the Web file (e.g., SOAPcompliant XML documents) 803. The CAM accomplishes this by using CAMmodel information (from repository 809) to perform data transformationsfrom one platform to another in the mixed language environment shown.

[0077] Type Descriptor Metamodel. One important feature provided by CAMis the Type Descriptor metamodel. The Type Descriptor metamodel definesthe physical realization, storage mapping, and the constraints on therealization (such as justification). This metamodel provides a physicalrepresentation of individual fields of a given data structure. Whensupporting data transformation in an enterprise application integrationenvironment, the model provides data type mapping between mixedlanguages. It also facilitates data translations from one language andplatform domain into another. The metamodel is used for runtime datatransformation (or marshaling) with a language-specific metamodel foroverall data structures and field names.

[0078] 1. Common Application Metamodel for Application Interfaces

[0079] The interconnection of disparate and dissimilar applicationsrunning on different software platforms, as shown in FIG. 1, withdifferent operating systems, physical platforms, and physicalrealizations is accomplished through connectors that incorporate theinterconnection metadata. Connectors are a central part of theapplication framework for e-business. The end user demand is to connectto anything interesting as quickly, and as easily, as possible.

[0080] A connector is required to match the interface requirements ofthe adapter and the legacy application. It is also required to mapbetween the two interfaces. Standardized metamodels for applicationinterfaces presented herein allow reuse of information in multipleconnector tools. These standardized metamodels not only reduce work tocreate a connector, but also reduce work needed to develop connectorbuilder tools.

[0081] The connectors built using the common application metamodel ofour invention provide interoperability with existing applications. Theconnectors support leveraging and reuse of data and business logic heldwithin existing application systems. The job of a connector is toconnect from one application system server “interface” to another.Therefore, an application-domain interface metamodel describessignatures for input and output parameters and return types for a givenapplication system domain (e.g. IMS, MQSeries); it is not for aparticular IMS or MQSeries application program. The metamodel containsboth syntactic and semantic interface metadata.

[0082] 1. a. End-to-End Connector Usage Using Common ApplicationMetamodel

[0083] The Common Application Metamodel (CAM) consists ofmeta-definitions of message signatures, independent of any particulartool or middleware. Different connector builder tools can use thisinformation to ensure the “handshaking” between these applicationprograms, across different tools, languages, and middleware. Forexample, if you have to invoke a MQSeries application, you would need tobuild a MQ message using data from a GUI tool and deliver it using theMQ API. Similarly, when you receive a message from the MQSeriesapplication, you would need to get the buffer from MQSeries, parse itand then put it into a GUI tool data structure. These functions can bedesigned and implemented efficiently by a connector builder tool usingCAM as standardized metamodels for application interfaces.

[0084] CAM can be populated from many sources, including copy books, togenerate HTML forms and JavaServer Page (JSP) for gathering inputs andreturning outputs. An example of a connector as depicted in the previousfigure is that the flow and message middleware makes a function call toan enterprise application by calling the connector which then calls theenterprise application API. The connector does language and data typemappings, for example, to translate between XML documents and COBOLinput and output data structures based on CAM. Connectors and CAMprovide the end-to-end integration between the middleware and theenterprise applications.

[0085] Using IMS as an example. Let's say that you must pass an accountnumber to an IMS transaction application program from your desktop towithdraw $50.00. With CAM and a connector builder tool, you will firstgenerate an input HTML form and an output JSP; and develop a middlewarecode necessary to support the request. The desktop application fills therequest data structure (i.e. an input HTML form) with values and callsthe middleware. The middleware service code will take the data from theGUI tool, build an IMS Connect XML-formatted message, and deliver themessage to the IMS gateway (i.e. IMS Connect) via TCP/IP. IMS Connecttranslates between the XML documents and the IMS message data structuresin COBOL using the metadata definitions captured in CAM. It then in turnsends the IMS message data structures to IMS via Open TransactionManager Access (OTMA). The IMS COBOL application program runs, andreturns the output message back to the middleware service code via IMSConnect. The middleware service code gets the message and populates theoutput JSP page (i.e. previously generated GUI tool reply datastructures) with the reply data. The transaction output data will thenbe presented to the user.

[0086] 2. Common Application Metamodel

[0087] CAM is used to describe information needed to easily integrateapplications developed in common programming models with other systems.The CAM metamodel can be used for both synchronous and asynchronousinvocations.

[0088] 2. a. Common Application Metamodel

[0089] The common application metamodel depicted as follows consists ofan invocation metamodel and an application-domain interface metamodelwhich uses language metamodels. For any given application-domaininterface metamodel, it may use one or many language metamodels, but,there could be zero or more invocation metamodels.

[0090] The common connector metamodel is illustrated in FIG. 3. It hasan Invocation Metamodel 301, an Application-Domain Interface Metamodel303, and a Language Metamodel 305.

[0091] 2. a. i. Invocation Metamodel

[0092] The invocation metamodel 301 consists of one or more of thefollowing possible metadata elements. However, for a particularinvocation, it could include only one or many of the following metadataelements.

[0093] Message-control information. This includes message controlinformation, such as the message connection name, message type, sequencenumbers (if any), and various flags and indicators for response,commit-confirmation, and processing options by which a client or servercan control message processing to be synchronous or asynchronous, etc.

[0094] The connection name can be used by the application system serverto associate all input and output with a particular client. The messagetype specifies that the message is a response message; or that commit iscomplete. It can also indicate server output data to the client, orclient input data to the server. Security data—This includesauthentication mechanism, and security data, e.g. digital certificates,identity, user name and password, etc. It may also include authorizationinformation to indicate whether the data can be authorized via a rolebased or ACL (access control list) based authorization.

[0095] Transactional semantics—This will carry transaction information,e.g. local vs. global transaction; two-phase commit vs. one-phasecommit, and transaction context, etc.

[0096] Trace and debug—Trace and debugging information are specified aspart of the metamodel.

[0097] Precondition and post-condition resource—This describesapplication state precondition and post-condition relationships.

[0098] User data—This includes any special information required by theclient. It can contain any data.

[0099] 2. a. ii. Application-Domain Interface Metamodel

[0100] The application-domain interface metamodel 303, as discussedearlier, describes signatures for input and output parameters and returntypes for application system domains.

[0101] 2. a, iii. Language Metamodel

[0102] The language metamodel 305, e.g. COBOL metamodel, is used byenterprise application programs to define data structures (semantics)which represent connector interfaces. It is important to connector toolsto show a connector developer the source language, the target language,and the mapping between the two. The CAM language metamodel alsoincludes the declaration text in the model which is not editable (i.e.read-only model). Because the connector/adapter developer would probablyprefer to see the entire COBOL data declaration, including comments andany other documentation that would help him/her understand the businessrole played by each field in the declaration.

[0103] The language metamodel is also to support data driven impactanalysis for application productivity and quality assurance. (But, it isnot the intention of the CAM to support reproduction of copybooks.)

[0104] The language metamodels describing connector data are listed asfollows:

[0105] C

[0106] C++

[0107] COBOL

[0108] PL/I

[0109] 2. a. iv. Type Descriptor Metamodel

[0110] The Type Descriptor metamodel is language neutral and defines thephysical realization, storage mapping and the constraints on therealization such as justification. This metamodel provides physicalrepresentation of individual fields of a given data structure. The typedescriptor metamodel is to support data transformation in an enterpriseapplication integration environment to provide data types mappingbetween mix languages. It also facilitates data translations from onelanguage and platform domain into another. This metamodel will be usedas a recipe for runtime data transformation (or marshaling) withlanguage specific metamodel for overall data structures and fieldsnames.

[0111] 3. An Example of Common Connector Metamodel

[0112] IMS OTMA (Open Transaction Manager Access) is atransaction-based, connectionless client/server protocol within anOS/390 sysplex environment. An IMS OTMA transaction message consists ofan OTMA prefix, plus message segments for input and output requests.Both input and output message segments contain llzz (i.e. length of thesegment and reserved field), and application data. Only the very firstinput message segment will contain transaction code in front of theapplication data. IMS transaction application programs can be written ina variety of languages, e.g. COBOL, PL/I, C, and Java, etc. Therefore,the application data can be in any one of these languages.

[0113] As shown in FIG. 4, an IMS OTMA connector metamodel 401 iscomposed of an invocation metamodel 403 and an IMS transaction messagemetamodel 405, as well as a COBOL metamodel 407 and a C metamodel 409.As depicted in FIG. 4, the invocation metamodel 401 is the OTMA prefix,and the IMS transaction message metamodel 405 is the application-domaininterface metamodel for the IMS application system which uses languagemetamodels. Metamodels for COBOL 407 and C 409 are shown.

[0114] 4. Type Descriptor Metamodel

[0115] The type descriptor metamodel presents a language and platformindependent way of describing implementation types, including arrays andstructured types. This information is needed for marshaling and forconnectors, which have to transform data from one language and platformdomain into another. Inspections of the type model for differentlanguages can determine the conformance possibilities for the languagetypes. For example, a long type in Java is often identical to a binarytype (computational-5) in COBOL, and if so, the types may beinter-converted without side effect. On the other hand, an alphanumerictype in COBOL is fixed in size and if mapped to a Java type, loses thisproperty. When converted back from Java to COBOL, the COBOL truncationrules may not apply, resulting in computation anomalies. In addition,tools that mix languages in a server environment (e.g., Java and COBOLin CICS and IMS) should find it useful as a way to determine howfaithfully one language can represent the types of another.

[0116] Therefore, an instance of the type descriptor metamodel describesthe physical representation of a specific data type for a particularplatform and compiler.

[0117] 4. a. TDLang Metamodel

[0118] The TDLang metamodel serves as base classes to CAM languagemetamodels by providing a layer of abstraction between the TypeDescriptor metamodel and any CAM language metamodel. All TDLang classesare abstract and common to all the CAM language metamodels. Allassociations between TDLang classes are marked as “volatile,”“transient,” or “derived” to reflect that the association is derivedfrom the language metamodel. The TDLang model does not provide anyfunction on its own, but it is the type target for the association fromthe Type Descriptor metamodel to the language metamodels.

[0119]FIG. 9 illustrates the structure of the TDLang Metamodel, with theTDLangClassifier 501, the TDLangComposedType 503 and the TDLangElement505.

[0120] With the TDLang base classes, the Type Descriptor metamodel canbe used as a recipe for runtime data transformation (or marshaling) withthe language-specific metamodel for overall data structures and fieldnames, without duplicating the aggregation associations present in thelanguage model.

[0121] 4. b. Type Descriptor Metamodel

[0122] This metamodel is a MOF Class instance at the M2 level. FIG. 10shows the relationships within the type descriptor Metamodel, includingthe PlatformCompilerType 601, the InstanceTDBase 603, the ArrayTD 605,the AggregateInstanceTD 607, the Simple InstanceTD 609, and theInstanceType 611. The InstanceType 611 comprises definitions of theStringTD 613, the AddressTD 615, the NumberTD 617, and the FloatTD 619.FIG. 11 illustrates a higher level view of the TDLanguageElement and thePlatformCompilerType 601. FIG. 12 illustrates enumerations of signCoding801, lengthEncoding 803, floatType 805, accessor 807, packedDecimalSign809, and bitModePad 811.

[0123] 4. C. Type Descriptor and Language Models

[0124] The Type Descriptor model is attached to the CAM Language modelby a navigable association between TDLangElement and InstanceTDBase.TDLangElement is the base language model type used to represent adeclared data item, i.e., an instance of a type. InstanceTDBase is thebase Type Descriptor model type used to represent theimplementation-specific instance of this same declared data item.InstanceTDBase is abstract; only one of its subtypes may beinstantiated.

[0125] It is possible that a data item declared in a programminglanguage may have different implementations. These differences areinduced by hardware platform, system platform, and compiler differences.This possibility is modeled by the PlatformCompilerType model type. Theassociation between TDLangElement and PlatformCompilerType is many toone, and the association between PlatformCompilerType and InstanceTDBaseis one to one. To navigate from the language model, it is necessary toknow what PlatformCompilerType is to be assumed. It is possible that animplementation, upon importing a model instance, will wish to removefrom the model the PlatformCompilerType instances that are not ofinterest.

[0126] The association between TDLangElement and InstanceTDBase ismodeled in this manner to allow for extending the model to include anassociation between PlatformCompilerType and a new type that more fullydescribes the hardware platform, the system platform, and the compiler.

[0127] Data element instances may be defined as repeating groups orarrays. This is modeled as a one to many association betweenInstanceTDBase and the ArrayTD model type. There would be one ArrayTDinstance in this association for each dimension, subscript, orindependent index of the data element. These instances hold informationabout the bounds and accessing computations.

[0128] The association is ordered in the same order as the correspondingassociation in the language model, and reflects the syntactic orderingof the indices as defined by the programming language. The rationale forthis choice is the resulting equivalence of navigation and processingalgorithms between the language model and the Type Descriptor model.Another choice, perhaps more advantageous to marshaling engines, wouldbe to have the ordering of the indices from the smallest stride to thelargest. This allows a marshaling engine to process the array in itsnatural storage order, assuming it is laid out in the usual contiguousfashion. A marshaling engine can compute this order by re-sorting theassociation targets according to the stride formulas if desired.

[0129] Array information may be a complex property of the data elementor of its type, and various languages and programming practices seem tofall on either side. The typedef facility of C and C++ allows thedefinition of some array types from typedefs, but only where the arraydefinitions are applied to the topmost elements of typedef aggregates.For example, consider the following typedef: typedef struct {   int A;  struct {     int C;     char D;     struct {       int F;       int G;    } E;   } B; } X;

[0130] This typedef can be used to create a new typedef for a fixed sizearray, e.g.

typedef X Q[10];

[0131] But it is not possible to create a new typedef from X that makesany of the subcomponents of X, e.g., D or E, into an array. This exampleand many others point out the unclear status of array definitions intyped languages.

[0132] An InstanceTDBase type has two concrete subtypes,SimpleInstanceTD and AggregateInstanceTD. SimpleInstanceTD models dataelements without subcomponents, while AggregateInstanceTD models dataelements with subcomponents. To find the subcomponents of anAggregateInstanceTD, one must navigate back to the corresponding dataelement declaration in the CAM language model. There, the associationbetween an aggregate type and its subcomponents may be navigated,leading to a set of subcomponent data elements, each of which has one ormore corresponding instances in the Type Descriptor model. Thisintroduces some model navigation complexity, but avoids duplicating theaggregation hierarchy in both the language and the Type Descriptormodels. The additional processing complexity of traversal is not great,and considerable simplification is obtained in algorithms that wouldmodify the model to add, delete or rearrange subcomponents in anaggregation.

[0133] A SimpleInstanceTD model type is also associated one to one witha BaseTD model type. The BaseTD model type is specialized to holdimplementation information that is common for all data elements of thesame language type. The information that describes a 32-bit signedbinary integer on a specific hardware/software platform is thusinstantiated only once in a given model instantiation, no matter howmany data elements may be declared with this type.

[0134] One may contemplate an association between TDLangClassifier andBaseTD matching the association between TDLangElement andInstanceTDBase. However, this is problematic in that constructions thatthe language regards as simple types (e.g., strings) may not mapdirectly to simple hardware/software types. Rather than introduce moremechanisms into the Type Descriptor model to describe stringimplementations, a specialization of BaseTD is utilized which describesthe common string implementations. Various attributes in theTypeDescriptor model are suffixed with the string “formula.” Theseattributes contain information that may in some cases be impossible tocompute without access to data created only at run-time. An example isthe current upper bound of a variable-sized array or the offset to anelement that follows another element whose size is only known atrun-time. Such information could be included as values in a modelinstance, but this would require a model instance for each run-timeinstance, and would mean that the model could only be constructed atrun-time, requiring the model definition to include factories and otherapparatus to create model instances at run-time. A model that can beconstructed from platform and compiler knowledge is much more useful,and the formulas provide a way to define concrete values when therun-time information is available. These formulas may be interpreted bymarshaling engines, or they may be used to generate marshaling code,which is loaded and executed by the marshaling engine on demand.

[0135] 4. d. Formulas

[0136] As used in connection with formulas, “field” refers to acomponent of a language data structure described by the Type Descriptormodel, while “attribute” denotes part of the model, and has a valuerepresenting a “property” of the field. Thus the value of a field meansa run-time value in a particular instance of a language data structure,whereas the value of an attribute is part of the description of a fieldin a language data structure, applies to all instances of the datastructure, and is determined when the data structure is modeled.

[0137] For most attributes in an instance of the Type Descriptor model,the value of the attribute is known when the instance is built, becausethe properties of the fields being described, such as size and offsetwithin the data structure, are invariant. But if a field in a datastructure is defined using the COBOL OCCURS DEPENDING ON construct orthe PL/I Refer construct, then some properties of the field (andproperties of other fields that depend on that field's value) cannot bedetermined when the model instance is built.

[0138] Properties that can be defined using these language constructsare string lengths and array bounds. A property that could indirectlydepend on these language constructs is the offset of a field within astructure, if the field follows a variable-size field.

[0139] In order to handle these language constructs, properties of afield that could depend on these constructs (and thus the values of thecorresponding attributes), are defined with strings that specify aformula that can be evaluated when the model is used.

[0140] However, if a property of a field is known when the modelinstance is built, then the attribute formula simply specifies aninteger value. For example, if a string has length 17, then the formulafor its length is “17”.

[0141] The formulas mentioned above are limited to the following:

[0142] Unsigned integers

[0143] The following arithmetic integer functions

[0144] neg(x):=−x // prefix negate

[0145] add(x,y):=x+y //infix add

[0146] sub(x,y):=x-y //infix subtract

[0147] mpy(x,y):=x*y //infix multiply

[0148] div(x,y):=x/y //infix divide

[0149] max(x,y):=max(x,y)

[0150] min(x,y):=min(x,y)

[0151] mod(x,y)=x mod y

[0152] The mod function is defined as mod(x,y) =r where r is thesmallest non-negative integer such that x−r is evenly divisible by y. Somod(7,4) is 3, but mod(−7,4) is 1. If y is a power of 2, then mod(x,y)is equal to the bitwise-and of x and y−1.

[0153] The val function

[0154] The val function returns the value of a field described by themodel. The val function takes one or more arguments, and the firstargument refers to the level-1 data structure containing the field, andmust be either:

[0155] the name of a level-1 data structure in the language model

[0156] the integer 1, indicating the level-1 parent of the variable-sizefield. In this case, the variable-size field and the field thatspecifies its size are in the same data structure, and so have a commonlevel-1 parent.

[0157] The subsequent arguments are integers that the specify theordinal number within its substructure of the (sub)field that should bedereferenced.

[0158] By default, COBOL data fields within a structure are not alignedon type-specific boundaries in storage. For example, the “natural”alignment for a four-byte integer is a full-word storage boundary. Suchalignment can be specified by using the SYNCHRONIZED clause on thedeclaration. Otherwise, data fields start immediately after the end ofthe preceding field in the structure. Since COBOL does not have bitdata, fields always start on a whole byte boundary.

[0159] For PL/I, the situation is more complicated. Alignment iscontrolled by the Aligned and Unaligned declaration attributes. Bycontrast with COBOL, most types of data, notably binary orfloating-point numbers, are aligned on their natural boundaries bydefault.

[0160] 4. d. i) Formula examples PL/I

[0161] 1. Given the following structure dcl /* offset */ 1 c unaligned/* “0” */ ,2 c1 /* “0” */ ,3 c2 fixed bin(31) /* “0” */ ,3 c3 fixedbin(31) /* “4” */ ,2 c4 /* “8” */ ,3 c5 fixed bin(31) /* “0” */ ,3 c6fixed bin(31) /* “4” */ ,3 c7 fixed bin(31) /* “8” */ ,2 c8 fixedbin(31) /* “20” */ ,2 c9 char( *refer(c7)) /* “24” */ ,2 c10 char(6) /*“add(24,val(1,2,3))” */ ,2 c11 char(4) /* “add(add(24,val(1,2,3)),6)” */

[0162] ;

[0163] The offset of c3 would be given by the simple formula “4”, butthe offset of c10 would be given by the formula:

“add(24,val(1,2,3))”

[0164] The first argument in the above val function is 1, whichindicates the current structure, c. The subsequent arguments are 2 and3, indicating that the third element, c7, of the second level-2 field,c4, is the field to be dereferenced.

[0165] The offset of C11 is equal to the offset of c10 plus the lengthof c10 and would be given by the following formula:

“add(add(24,val(1,2,3)),6)”

[0166] PL/I structure mapping is not top-down, and this can beillustrated by examining the mapping of the following structure: dcl /*offset */ 1 a based, /* “0” */ 2 b, /* “0” */ 3 b1 fixed bin(15), /* “0”*/ 3 b2 fixed bin(15), /* “2” */ 3 b3 fixed bin(31), /* “4” */ 2 c, /*“add(8,mod(neg(val(1,1,1)),4))” */ 3 c1 char( n refer(b1)), /* “0” */ 3c2 fixed bin(31); /* “val(1,1,1)” */

[0167] The value of b1 is given by val(1,1,1), and in order to put c2 ona 4-byte boundary, PL/I puts any needed padding before c (yes, notbetween c1 and c2), and hence the offset of c would be given by thefollowing formula:

“add(8,mod(neg(val(1,1,1)),4))”

[0168] So if b1 contains the value 3, then this formula becomesadd(8,mod(neg(3),4)), which evaluates to 9. I.e., there is one byte ofpadding between the structure b and the structure c.

[0169] The model also uses these formulas to specify the bounds andstrides in an array, where the stride is defined as the distance betweentwo successive elements in an array.

[0170] For example, in the following structure, the second dimension ofa.e has a stride specified by the formula “4”, and the first dimensionby the formula “20”: dcl  1 a,      /* offset = “0”   */  2 b(4) fixedbin(31),  /* offset = “0”   */ /* lbound(1) = “1”   */ /* hbound(1) =“4”   */ /* stride(1) = “4”   */ 2 c(4) fixed bin(31),  /* offset “ 16”  */ /* lbound(1) = “1”   */ /* hbound(1) = “4”   */ /* stride(1) = “4”  */ 2 d(4) char(7) varying,  /* offset = “32”   */ /* lbound(1) = “1”  */ /* hbound(1) = “4”   */ /* stride(1) = “9”   */ 2 e(4,5) fixedbin(31);  /* offset = “68”   */ /* lbound(1) = “1”   */ /* hbound(1) =“4”   */ /* stride(1) = “20”   */ /* lbound(2) = “1”   */ /* hbound(2) =“5”   */ /* stride(1) = “4”   */

[0171] This means that to locate the element a.e(m,n), one would takethe address of a.e and add to it

(m−1)*20+(n−1)*4.

[0172] If the example were changed slightly to: dcl 1 a(4),  /* offset =“0”    */ /* lbound(1) = “1”   */ /* hbound(1) = “4”   */ /* stride(1) =“40”   */ 2 b fixed bin(31),  /* offset = “0”    */ 2 c fixedbin(31),  /* offset = “4”    */ 2 d char(7) varying, /* offset = “8”   */ 2 e(5) fixed bin(31); /* offset = “20”   */ /* lbound(1) = “1”  */ /* hbound(1) = “5”   */ /* stride(1) = “4”   */

[0173] then there is padding between d and e, but the user of the typedescriptor can be blissfully unaware and simply use the stride andoffset formulas to locate any given array element.

[0174] The stride for a is “40”, the stride for e is “4”, and the offsetfor e is “20”. This means that to locate the element a(m).e(n), onewould take the address of a and add to it (m−1)*40+20+(n−1)*4.

[0175] Finally, if the example were changed again to: dcl 1 a(4),  /*offset = “0”    */ /* lbound(1) = “1”   */ /* hbound(1) = “4”   */ /*stride(1) = “40”   */ 2 b fixed bin(31) ,  /* offset = “0”    */ 2 c(8)bit(4),   /* offset = “4”    */ /* lbound(1) = “1”   */ /* hbound(1) =“8”   */ /* stride(1) = “4”   */ 2 d char(7) varying, /* offset = “8”   */ 2 e(5) fixed bin(31) ; /* offset = “20”   */ /* lbound(1) = “1”  */ /* hbound(1) = “5”   */ /* stride(1) = “4”   */

[0176] then the computations for a.e are the same as above, but thecomputations for a.c become interesting.

[0177] The stride for a is still “40”, the stride for c is “4” (but this“4” is a count of bits, not bytes), and the byte offset for c is “4”. Tolocate the element a(m).c(n), one needs both a byte address and a bitoffset. For the byte address, one would take the address of a and add toit (m−1)*40+4+((n−1)*4)/8. The bit offset of a(m).c(n) would be given bymod((n−1)*4,8).

[0178] 4. e. Type Descriptor Specification

[0179] 4. e. i. TDLang Metamodel Specification

[0180] TDLang Classes—General Overview. TDLang classes serve as a layerof abstraction between any CAM language model and the TypeDescriptormodel.

[0181] Since any CAM language model can plug into the TDLang model, theType Descriptor model only needs to understand how to interface withTDLang in order to access any CAM language model.

[0182] The TDLang model does not provide any function on its own andtherefore only makes sense when it is attached to a language model.TDLang is common to all the CAM language models and is the type targetfor the association from TypeDescriptors to the language models.

[0183] Note all TDLang classes are abstract and they serve as the baseclasses to the language metamodels.

[0184] TDLangClassifier. TDLangClassifier is the parent class of alllanguage-specific Classifier classes and TDLangComposedType. TheTDLangSharedType association is derived from the language's“+sharedType” association from Element to Classifer class. Theassociation should be marked “volatile,” “transient,” or “derived” toreflect that the association is derived from the language model. TheTDLangClassifier is derived from TDLangModelElement

[0185] TDLangElement. TDLangElement is the parent class of alllanguage-specific Element classes. The tdLangTypedElement association isderived from the language's “+typedElement” association from Classiferto Element class. The association should be marked “volatile”,“transient”, and “derived” to reflect that the association is derivedfrom the language model.

[0186] The tdLangElement association is derived from the language's“+element” association from Classifer to Element class. The associationshould be marked “volatile,” “transient,” or “derived” to reflect thatthe association is derived from the language model.

[0187] TDLangComposedType. The TDLangComposedType is the parent class ofall language-specific ComposedTypes. The TDLangGroup association isderived from the language's “+group” association from Element toComposedType class. The association should be marked “volatile,”“transient,” or “derived” to reflect that the association is derivedfrom the language model. The TDLangComposedType is derived fromTDLangClassifier.

[0188] 4. e. ii. Type Descriptor Metamodel Specification

[0189] The Type Descriptor package defines a model for describing thephysical implementation of a data item type. This model is languageneutral and can be used to describe the types of many languages.Inspections of the type model for different languages can determine theconformance possibilities for the language types. For example, a longtype in Java is often identical to a binary type in COBOL, and if so,the types may be interconverted without side effect. On the other hand,an alphanumeric type in COBOL is fixed in size and if mapped to a Javatype, will lose this property. When converted back from Java to COBOL,the COBOL truncation rules may not apply, resulting in computationanomalies.

[0190] AggregateInstanceTD. For each instance of an aggregate, there isan instance of this class. To find the children of this aggregate, onemust navigate the associations back to language Classifier then downcastto language Composed Type and follow the association to its children.

[0191] Derived from InstanceTDBase

[0192] Public Attributes:

[0193] union: boolean=false

[0194] Distinguishes whether the aggregation is inclusive (e.g. astructure) or exclusive (e.g. a union).

[0195] If union=true, storage might be overlaid and as a result theinterpretation of the content may be uncertain.

[0196] ArrayTD. ArrayTD holds information for array types.

[0197] Public Attributes:

[0198] arraryAlign: int

[0199] Alignment requirements in addressible units for each element inthe array.

[0200] strideFormula: string

[0201] A formula that can be used to calculate the displacement addressof any element in the array, given an index.

[0202] strideInBit: boolean

[0203] True indicates strideFormula value in bits

[0204] False indicates strideFormula value in bytes

[0205] upperBoundFormula: String

[0206] Declared as a String for instances when this value is referencedby a variable.

[0207] This attribute supplies the upperbound value of a variable sizearray

[0208] Upperbound is required when traversing back up the entirestructure.

[0209] lowerBoundFormula: String

[0210] Declared as a String for instances when this value is referencedby a variable.

[0211] This attribute supplies the lowerbound value of a variable sizearray.

[0212] InstanceTDBase. InstanceTD has instances for each declaredvariable and structure element.

[0213] To find the parent of any instance (if it has one) one mustnavigate the associations back to TDLangElement, follow the associationto TDLangClassifier to locate the parent, then follow the associationsback into the TypeDescriptor model.

[0214] Public Attributes:

[0215] offsetFormula: string

[0216] A formula for calculating the offset to the start of thisinstance.

[0217] This attribute is String because this field may not always be aninteger value. For example, (value(n)+4) could be a possible value.

[0218] NOTE: The offset value is calculated from the top-most parent.(e.g., for a binary tree A→B, A→C, B→D, B→E. The offset to D iscalculated from A to D, not B to D)

[0219] contentSizeFormula: string

[0220] Formula for calculating the current size of the contents

[0221] allocSizeFormula: string

[0222] Formula for calculating the allocated size of the instance

[0223] formulaInBit: boolean

[0224] True indicates offsetFormula, contentSizeFormula, andallocSizeFormula values are in bits

[0225] False indicates offsetFormula, contentSizeFormula, andallocSizeFormula values are in bytes

[0226] defaultEncoding: String

[0227] Physical encoding—how many bits used to encode code points, howare the code points mapped onto bit patterns

[0228] Contains info on how string content is encoded: EBCDIC, ASCII,UNICODE, UTF-8, UTF-16, codepage numbers, etc . . .

[0229] accessor: enumeration

[0230] Specifies access-rights for this element.

[0231] defaultBigEndian: boolean

[0232] True if this element is Big Endian format.

[0233] floatType: enumeration

[0234] Specifies this element's float type.

[0235] PlatformCompilerType. A specific data type for a particularplatform and compiler.

[0236] NOTE: There needs to be some way to identify the platform andcompiler. This class can be specialized or have an attribute, or besimplified by putting an attribute on InstanceTDBase.

[0237] Public Attributes:

[0238] platformCompilerType: String

[0239] This attribute specifies the type of compiler used to create thedata in the language model. Usage of this string is as follows:

[0240] “Vendor name, language, OS, hardware platform” (e.g., “IBM,COBOL, OS390, 390” or “IBM, PLI, WinNT, Intel”)

[0241] SimpleInstanceTD. An instance of a Simple type in the languagemodel.

[0242] Derived from InstanceTDBase

[0243] NumberTD

[0244] All numbers representations.

[0245] Currently includes Integers and Packed Decimals

[0246] Note required fields for these types of Numbers:

[0247] *Integer*

[0248] Base=2

[0249] MSBU=0 or 1

[0250] Signed/Unsigned

[0251] Size (in bytes) =1,2,4,8 (16)

[0252] *Packed Decimal*

[0253] Base=10

[0254] MSBU=0

[0255] Signed

[0256] Width=1-63

[0257] *Float*

[0258] Base=2(IEEE), 16(Hex)

[0259] MSBU=0 or 1

[0260] Signed

[0261] Size (in bytes)=4,8,16

[0262] Encoding Details . . .

[0263] Derived from BaseTD

[0264] Public Attributes:

[0265] base: int

[0266] The base representation of this number. 2=binary, 10=decimal,16=hex,

[0267] . . .

[0268] baseWidth: int

[0269] Number of bits used to represent base:

[0270] e.g. binary=1, decimal=8, packed=4

[0271] baseInAddr: int

[0272] Number of baseWidth units in addressable storage units—e.g.decimal=1, packed=2, binary=8 where the addressable unit is a byte. Ifthe addressable unit was a 32 bit word, decimal would be 4, packed wouldbe 8, and binary would be 32.

[0273] baseUnits: int

[0274] Number of base units in the number. This times the base widthmust be less than or equal to the width times the addrUnit.

[0275] For example, a 24 bit address right aligned in a 32 bit wordwould have base=1, basewidth=24, baseInAddr=8, width=4.

[0276] signcoding: enumeration

[0277] A set of enumerations—2's complement, 1's complement, and signmagnitude for binary; zone signs for decimal, packed signs for packeddecimal, and unsigned binary, unsigned decimal.

[0278] checkValidity: boolean

[0279] True if language model is required for picture string support

[0280] packedDecimalSign: enumeration

[0281] Used to determine the code point of the sign in COBOL decimalnumbers, where the sign is combined with the leading or trailing numericdigit.

[0282] FloatTD

[0283] Floating points

[0284] Derived from BaseTD

[0285] Public Attributes:

[0286] floatType: enumeration

[0287] Specifies this element's float type.

[0288] I StringTD

[0289] Alphanumeric type

[0290] Derived from BaseTD

[0291] Public Attributes:

[0292] encoding: String

[0293] Physical encoding—how many bits used to encode code points, howare the code points mapped onto bit patterns

[0294] Contains info on how string content is encoded: EBCDIC, ASCII,

[0295] UNICODE, UTF-8, UTF-16, codepage numbers, etc . . .

[0296] lengthEncoding: enumeration

[0297] Possible values for lengthEncoding:

[0298] Fixed length (where total length equals declared string length)

[0299] Length prefixed (where total length equals declared string lengthplus length of header bytes; usually 1, 2, or 4 bytes)

[0300] Null terminated (known as varyingZ strings in PL/I) (where a nullsymbol is added to the end of string; so the maximum length could be upto declared string length plus one byte to represent null character)maxLengthFormula: String

[0301] Formula specifying the maximum length of this string.checkValidity: boolean

[0302] True if language model is required for picture string support

[0303] textType: String=Implicit

[0304] Value is ‘Implicit’ or ‘Visual’

[0305] orientation: StringTD=LTR

[0306] Value is ‘LTR’, ‘RTL’, ‘Contextual LTR’, or ‘Contextual RTL’

[0307] where LTR=Left to Right

[0308] and RTL=Right to Left

[0309] Symmetric: boolean=true

[0310] True if symmetric swapping is allowed

[0311] numeralShapes: String=Nominal

[0312] Value is ‘Nominal’, ‘National’, or ‘Contextual’

[0313] textShape: String=Nominal

[0314] Value is ‘Nominal’, ‘Shaped’, ‘Initial’, ‘Middle’, ‘Final’, or‘Isolated’

[0315] AddressTD

[0316] Type to represent pointers/addresses

[0317] Rationale for this class:

[0318] Addresses should be considered separate from NumberTD classbecause some languages on certain machines (e.g., IBM 400) representaddresses with additional information, such as permission type (which isnot represented in NumberTD class) Derived from BaseTD

[0319] Public Attributes:

[0320] permission: String

[0321] Specifies the permission for this address. Used primarily forAS/400 systems.

[0322] bitModePad: enumeration

[0323] Specifies the number of bits for this address. Used to calculatepadding.

[0324] BaseTD

[0325] The base class of typeDescriptor.

[0326] The BaseTD model type is specialized to hold implementationinformation which is common for all data elements of the same languagetype. The information which describes a 32 bit signed binary integer ona specific hardware/software platform is thus instantiated only once ina given model instantiation, no matter how many data elements may bedeclared with this type.

[0327] Public Attributes:

[0328] addrUnit: enumeration

[0329] Number of bits in storage addressable unit

[0330] bit/byte/word/dword

[0331] width: int

[0332] Number of addressable storage units in the described type. Thiscan be 1, 8, 16, 32 bits.

[0333] alignment: int

[0334] Required alignment of type in address space—e.g. word aligned 32bit integer would have alignment of 4

[0335] nickname: int

[0336] Name of the base element. This should uniquely identify aninstance of a simple type to allow logic based on name rather than logicbased on combinations of attributes. E.g. “S390Binary31_(—)0” for a 32bit S/390 unsealed binary integer

[0337] bigEndian: boolean

[0338] True if this element is Big Endian format.

[0339] Stereotypes

[0340] bitModePad

[0341] Public Attributes:

[0342] 16 bit:

[0343] 24 bit:

[0344] 31 bit:

[0345] 32 bit:

[0346] 64 bit:

[0347] 128 bit:

[0348] signcoding

[0349] Note that this model does not include the following COBOL usages:

[0350] POINTER

[0351] PROCEDURE-POINTER

[0352] OBJECT REFERENCE

[0353] Public Attributes:

[0354] twosComplement:

[0355] onesComplement:

[0356] signMagnitude:

[0357] zoneSigns:

[0358] packedSigns:

[0359] unsignedBinary:

[0360] unsignedDecimal:

[0361] lengthEncoding

[0362] Public Attributes:

[0363] fixedLength:

[0364] lengthPrefixed:

[0365] nullTerminated:

[0366] floatType

[0367] Public Attributes:

[0368] Unspecified:

[0369] IEEEextendedIntel:

[0370] For IEEE extended floats running on Intel Platform

[0371] EEEextendedAIX:

[0372] For IEEE extended floats running on AIX Platform

[0373] EEEextended0S390:

[0374] For IEEE extended floats running on OS/390 Platform

[0375] IEEEextendedAS400:

[0376] For IEEE extended floats running on AS400 Platform

[0377] IEEEnonextended:

[0378] For IEEE non-extended floats

[0379] IBM390Hex:

[0380] For Hexadecimal floats running on IBM OS/390

[0381] IBM400Hex:

[0382] For Hexadecimal floats running on IBM AS400

[0383] accessor

[0384] Public Attributes:

[0385] ReadOnly:

[0386] WriteOnly:

[0387] ReadWrite

[0388] NoAccess

[0389] packedDecimalSign

[0390] Public Attributes:

[0391] MVS:

[0392] MVSCustom:

[0393] NT/OS2/AIX:

[0394] 5. Language Metamodels

[0395] 5. b. PL/I Metamodel

[0396] The PLI language metamodel is used by enterprise applicationprograms to define data structures (semantics) which represent connectorinterfaces. This metamodel is a MOF Class instance at the M2 level. FIG.13 illustrates a PL/I language metamodel, which is usable by applicationprograms to define data structures which represent connector interfaces.This metamodel is an MOF class instance at the M2 level. FIG. 14illustrates the TDLangClassifier, the TDLanguageComposedType, and theTDLanguageElement for the PL/I Metamodel. FIG. 15 illustratesenumerations of Mode Values, Base Values, LengthTypes, andStringTypeValues for the PL/I Metamodel.

[0397] 5. b. i. PL/I Metamodel Specification

[0398] PLI

[0399] The PLI language metamodel is used by enterprise applicationprograms to define data structures (semantics) which represent connectorinterfaces,

[0400] This language model for PL/I attempts to describe PL/I declaresthat have the storage class of either PARAMETER, STATIC or BASED.CONTROLLED, AUTOMATIC and DEFINED are not supported.

[0401] In the PL/I languages, extents( that is string lengths, areasizes and array bounds) may, in general, be declared as constants, asexpressions to be evaluated at run-time, as asterisks, or as defined viathe REFER option; however, none of these choices are valid for allstorage classes.

[0402] Based variables whose extents are not constant and not definedvia the REFER option are excluded from this model, as are parameterswhose extents are specified via asterisks.

[0403] The INITIAL attribute (which is not valid for parameters in anycase) will be ignored by the model.

[0404] PLISimpleType

[0405] PLISimpleType is an abstract class that contains attributesshared by all simple types in the PLI language.

[0406] Derived from PLIClassifier

[0407] PLIElement

[0408] * A PLIDeclaration represents every data definition in the PLIprogram.

[0409] * For example:

[0410] DCL 1 Employee,

[0411] 2 Name,

[0412] 3 Last char(29),

[0413] 3 First char(29),

[0414] 2 Deparment char(5);

[0415] where Eemployee, Name, Last, First, and Department are all PLIElements.

[0416] ntation.

[0417] Derived from TDLangElement

[0418] Public Attributes:

[0419] level: String

[0420] PLIComposedType

[0421] PLIComposedType is a collection of member elements that can bestructure, unions, or elementary variables and arrays. PLIComposedTypehas a single aggregation to include all the elements that are a part ofthis composition.

[0422] A structure is a data aggregate whose elements need not haveidentical attributes. Like an array, the entire tructure is given a namethat can be used to refer to the entire aggregate of data. Unlike anarray, however, each element of a structure also has a name.

[0423] A structure has different levels. At the first level is thestructure name called a major structure. At a deeper level are the namesof substructures called minor structures. At the deepest are the elementnames called elementary names. An elementary name in a structure canrepresent an array, in which case it is not an element variable, but anarray variable.

[0424] The organization of a structure is specified in a DECLAREstatement through the use of level numbers preceding the associatednames; level numbers must be integers. A major structure name isdeclared with the level number 1. Minor structures and elementary namesare declared with level numbers greater than 1.

[0425] The description of a major structure name is terminated by one ofthe following:

[0426] The declaration of another item with a level number 1 Thedeclaration of another item with no level number A semicolon terminatingthe DECLARE statement

[0427] A delimiter (usually a blank) must separate the level number andits associated name. For example, the items of a payroll can be declaredas follows:

[0428] DECLARE 1 PAYROLL,

[0429] 2 NAME,

[0430] 3 LAST CHAR(20),

[0431] 3 FIRST CHAR(15),

[0432] 2 HOURS,

[0433] 3 REGULAR FIXED DEC(5,2),

[0434] 3 OVERTIME FIXED DEC(5,2),

[0435] 2 RATE,

[0436] 3 REGULAR FIXED DEC(3,2),

[0437] 3 OVERTIME FIXED DEC(3,2);

[0438] Indentation is only for readability. The statement could bewritten in a continuous string as DECLARE 1 PAYROLL, 2 NAME, 3 LASTCHAR(20), etc.

[0439] PAYROLL is declared as a major structure containing the minorstructures NAME, HOURS, and RATE. Each minor structure contains twoelementary names. You can refer to the entire structure by the namePAYROLL, or to portions of the structure by the minor structure names.You can refer to an element by referring to an elementary name.

[0440] The level numbers you choose for successively deeper levels neednot be consecutive. A minor structure at level n contains all the nameswith level numbers greater than n that lie between that minor structurename and the next name with a level number less than or equal to n.PAYROLL might have been declared as follows:

[0441] DECLARE 1 PAYROLL,

[0442] 4 NAME,

[0443] 5 LAST CHAR(20),

[0444] 5 FIRST CHAR(15),

[0445] 2 HOURS,

[0446] 6 REGULAR FIXED DEC(5,2),

[0447] 5 OVERTIME FIXED DEC(5,2),

[0448] 2 RATE,

[0449] 3 REGULAR FIXED DEC(3,2),

[0450] 3 OVERTIME FIXED DEC(3,2);

[0451] This declaration results in exactly the same structuring as theprevious declaration.

[0452] Derived from PLIClassifier, TDLangComposedType

[0453] Public Attributes:

[0454] Union: Boolean

[0455] PLIElementInitialValue

[0456] The INITIAL attribute specifies an initial value or valuesassigned to a variable at the time storage is allocated for it. Only oneinitial value can be specified for an element variable. More than onecan be specified for an array variable. A structure or union variablecan be initialized only by separate initialization of its elementarynames, whether they are element or array variables. The INITIALattribute cannot be given to constants, defined data, noncontrol ledparameters, and non-LIMITED static entry variables.

[0457] The INITIAL attribute has three forms.

[0458] 1. The first form, INITIAL, specifies an initial constant,expression, or function reference, for which the value is assigned to avariable when storage is allocated to it.

[0459] 2. The second form, INITIAL CALL, specifies (with the CALLoption) that a procedure is invoked to perform initialization. Thevariable is initialized by assignment during the execution of the calledroutine. (The routine is not invoked as a function that returns a valueto the point of invocation.)

[0460] 3. The third form, INITIAL TO, specifies that the pointer (orarray of pointers) is initialized with the address of the

[0461] character string specified in the INITIAL LIST. The string alsohas the attributes indicated by the TO keyword.

[0462] Derived from TDLangElement

[0463] Public Attributes:

[0464] initialValue: String

[0465] ValueType: PLIInitalValueType

[0466] PLIClassifier

[0467] PLI type

[0468] Derived from TDLangClassifier

[0469] PLISourceText

[0470] This class contains the entire source code (including comments)and its associated line number.

[0471] Public Attributes:

[0472] source: String

[0473] fileName: String

[0474] PLIComputationalType

[0475] Computational types represent values that are used incomputionals to produce a desired result. Arthmetic and string dataconsitute computional data

[0476] Derived from PLISimpleType

[0477] PLIArithmeticType

[0478] Aritmetic data are rational numbers

[0479] Derived from PLIComputationalType

[0480] Public Attributes:

[0481] mode: ModeValues

[0482] PLIStringType

[0483] a string is a sequence of contiguous characters, bit, cidechars,or graphics that are treated a a single data item

[0484] Derived from PLIComputationalType

[0485] PLIIntegerType

[0486] Declared as Fixed Bin. with precision and scale factors. Theprcision is the total number of digits and the scale is the number ofdigits to the right of the binary point.

[0487] Example

[0488] DCL bindata BINARY FIXED (7,3)

[0489] could be used to present the number 1011.111B that is 7 databits, 3 of which is to the right of the binary point.

[0490] Derived from PLIArithmeticType

[0491] Public Attributes:

[0492] precision: Integer

[0493] scale: Integer

[0494] Signed: Boolean

[0495] BigEndian: Boolean=true

[0496] PLIFloatType

[0497] has precision=2A decimal floating-point constant is a mantissafollowed by an exponent. The mantissa is a decimal fixed-point constant.The exponent is the letter E followed by an optionally signed integer,which specifies a power of ten. Decimal floating-point constants have aprecision (p), where p is the number of digits of the mantissa.

[0498] Examples are:

[0499] 15E-23 has precision=2

[0500] 15E23 has precision=2)

[0501] 4E−3 has precision=1

[0502] 1.96E+07 has precision=3

[0503] 438E0 has precision=3

[0504] 3141593E−6 has precision=7

[0505] 0.003141593E3 has precision=9

[0506] The last two examples represent the same value (although withdifferent precisions).

[0507] The data attributes for declaring decimal floating-pointvariables are DECIMAL and FLOAT. For example:

[0508] DECLARE LIGHT_YEARS DECIMAL FLOAT(5);

[0509] LIGHT_YEARS represents decimal floating-point data items with atleast 5 decimal digits.

[0510] A binary floating-point constant is a mantissa followed by anexponent and the letter B. The mantissa is a binary fixed-pointconstant. The exponent is the letter E, followed by an optionally signeddecimal integer, which specifies a power of two. Binary floating-pointconstants have a precision (p) where p is the number of binary digits ofthe mantissa. Examples are:

[0511] 101101E5B has precision=6

[0512] 101.101E2B has precision=6

[0513] 11101E28B has precision=5

[0514] 11.01E+42B has precision=4

[0515] The data attributes for declaring binary floating-point variablesare BINARY and FLOAT. For example:

[0516] DECLARE S BINARY FLOAT (16);

[0517] S represents binary floating-point data items with a precision of16 binary digits.

[0518] The default precision is (21). The exponent cannot exceed threedecimal digits. Binary floating-point data is stored as normalizedhexadecimal floating-point. If the declared precision is less than orequal to (21), short floating-point form is used. If the declaredprecision is greater than (21) and less than or equal to (53), longfloating-point form is used. If the declared precision is greater than(53), extended floating-point form is used.

[0519] Derived from PLIArithmeticType

[0520] Public Attributes:

[0521] base: BaseValues

[0522] precision: Integer

[0523] IEEE: Boolean=false

[0524] BigEndian: Boolean=true

[0525] PLIPackedType

[0526] The data attributes for declaring decimal fixed-point variablesare DECIMAL and FIXED. For example:

[0527] declare A fixed decimal (5,4);

[0528] specifies that A represents decimal fixed-point data of 5 digits,4 of which are to the right of the decimal point.

[0529] These two examples:

[0530] declare B fixed (7,0) decimal;

[0531] declare B fixed decimal(7);

[0532] both specify that B represents integers of 7 digits.

[0533] This example

[0534] declare C fixed (7,−2) decimal;

[0535] specifies that C has a scaling factor of −2. This means that Cholds 7 digits that range from −9999999*100 to 9999999*100, inincrements of 100.

[0536] This example

[0537] declare D decimal fixed real(3,2);

[0538] specifies that D represents fixed-point data of 3 digits, 2 ofwhich are fractional.

[0539] Derived from PLIArithmeticType

[0540] Public Attributes:

[0541] precision: Integer

[0542] scale: Integer

[0543] PLIPictureType

[0544] Numeric picture data is numeric data that is held in characterform Derived from PLIArithmeticType

[0545] Public Attributes:

[0546] pictureString: String

[0547] PLICodedStringType

[0548] Derived from PLIStringType

[0549] Public Attributes:

[0550] type: StringTypeValues

[0551] varying: LengthType

[0552] PLIPictureStringType

[0553] A character picture specification describes a fixed-lengthcharacter data item, with the additional facility of indicating that anyposition in the data item can only contain characters from certainsubsets of the complete set of available characters.

[0554] A character picture specification is recognized by the occurrenceof an A or X picture specification character. The only valid charactersin a character picture specification are X, A, and 9. Each of thesespecifies the presence of one character position in the character value,which can contain the following:

[0555] X Any character of the 256 possible bit combinations representedby the 8-bit byte.

[0556] A Any alphabetic character, #, @, $, or blank.

[0557] 9 Any digit, or blank. (Note that the 9 picture specificationcharacter in numeric character specifications is different in that thecorresponding character can only be a digit).

[0558] When a character value is assigned, or transferred, to a picturedcharacter data item, the particular character in each position ischecked for validity, as specified by the corresponding picturespecification character, and the CONVERSION condition is raised for aninvalid character. (However, if you change the value either viarecord-oriented transmission or using an alias, there is no checking).For example:

[0559] DECLARE PART# PICTURE ‘AAA99X’;

[0560] PUT EDIT (PART#) (P‘AAA99X’);

[0561] The following values are valid for PART#:

[0562] ‘ABC12M’

[0563] ‘bbb09/’

[0564] ‘XYZb13’

[0565] The following values are not valid for PART# (the invalidcharacters are underscored):

[0566] ‘AB123M’

[0567] ‘ABC1/2’

[0568] ‘Mb#A5;’

[0569] Derived from PLIStringType

[0570] Public Attributes:

[0571] pictureString: String

[0572] PLINonComputationalType

[0573] Represents values that are used to control execution of yourprogram. It consists of the following data types—area, entry, label,file, format, pointer, and offset.

[0574] Derived from PLISimpleType

[0575] PLILabelType

[0576] A label is a label constant or the value of a label variable.

[0577] A label constant is a name written as the label prefix of astatement (other than PROCEDURE, ENTRY, PACKAGE, or FORMAT) so thatduring execution, program-control can be transferred to that statementthrough a reference to it. In the following line of code, for example,Abcde is a label constant.

Abcde: Miles=Speed*Hours;

[0578] The labelled statement can be executed either by normalsequential execution of instructions or by using the GO TO statement totransfer control to it from some other point in the program.

[0579] A label variable can have another label variable or a labelconstant assigned to it. When such an assignment is made, theenvironment of the source label is assigned to the target. If youdeclare a static array of labels to have initial values, the array istreated as nonassignable.

[0580] A label variable used in a GO TO statement must have as its valuea label constant that is used in a block that is active at the time theGO TO is executed. Consider the following example:

[0581] declare Lbl_x label;

[0582] Lbl_a: statement;

[0583] Lbl_b: statement;

[0584] Lbl_x=Lbl_a;

[0585] go to Lbl_x;

[0586] Lbl_a and Lbl_b are label constants, and Lbl_x is a labelvariable. By assigning Lbl_a to Lbl_x, the statement GO TO Lbl_xtransfers control to the Lbl_a

[0587] statement. Elsewhere, the program can contain a statementassigning Lbl_b to Lbl_x. Then, any reference to Lbl_x would be the sameas a reference to Lbl_b.

[0588] This value of Lbl_x is retained until another value is assignedto it.

[0589] If a label variable has an invalid value, detection of such anerror is not guaranteed. In the following example, transfer is made to aparticular element of the array Z based on the value of I.

[0590] go to Z(I);

[0591] Z(1): if X=Y then return;

[0592] Z(2): A=A+B+C*D;

[0593] Z(3): A=A+10;

[0594] If Z(2) is omitted, GO TO Z(I) when I=2 raises the ERRORcondition. GO

[0595] TO Z(I) when I<LBOUND(Z) or I>HBOUND(Z) causes unpredictableresults if the

[0596] SUBSCRIPTRANGE condition is disabled.

[0597] Derived from PLINonComputationalType

[0598] PLIFormatType

[0599] The remote (or R) format item specifies that the format list in aFORMAT statement is to be used.

[0600] The R format item and the specified FORMAT statement must beinternal to the same block, and they must be in the same invocation ofthat block.

[0601] A remote FORMAT statement cannot contain an R format item thatreferences itself as a label-reference, nor can it reference anotherremote FORMAT statement that leads to the eferencing of the originalFORMAT statement.

[0602] Conditions enabled for the GET or PUT statement must also beenabled for the remote FORMAT statement(s) that are referred to.

[0603] If the GET or PUT statement is the single statement of anON-unit, that statement is a block, and it cannot contain a remoteformat item.

[0604] For example:

[0605] DECLARE SWITCH LABEL;

[0606] GET FILE(IN) LIST(CODE);

[0607] IF CODE=1

[0608] THEN SWITCH=L1;

[0609] ELSE SWITCH=L2;

[0610] GET FILE(IN) EDIT (W,X,Y,Z)

[0611] (R(SWITCH));

[0612] L1: FORMAT (4 F(8,3));

[0613] L2: FORMAT (4 E(12,6));

[0614] SWITCH has been declared to be a label variable; the second GETstatement can be made to operate with either of the two FORMATstatements.

[0615] Data format items describe the character or graphicrepresentation of a single data item. They are:

[0616] A-Character

[0617] B-Bit

[0618] C-Complex

[0619] E-Floating point

[0620] F-Fixed point

[0621] G-Graphic

[0622] P-Picture

[0623] The remote format item specifies a label reference whose value isthe label constant of a FORMAT statement located elsewhere. The FORMATstatement contains the remotely situated format items. The labelreference item is: R.

[0624] The first data format item is associated with the first data listitem, the second data format item with the second data list item, and soon. If a format list contains fewer data format items than there areitems in the associated data list, the format list is reused. If thereare excessive format items, they are ignored.

[0625] Suppose a format list contains five data format items and itsassociated data list specifies ten items to be transmitted. The sixthitem in the data list is associated with the first data format item, andso forth. Suppose a format list contains ten data format items and itsassociated data list specifies only five items. The sixth through thetenth format items are ignored.

[0626] Example:

GET EDIT (NAME, DATA, SALARY)(A(N), X(2), A(6), F(6,2));

[0627] This example specifies that the first N characters in the streamare treated as a character string and assigned to NAME. The next 2characters are skipped. The next 6 are assigned to DATA in characterformat. The next 6 characters are considered an optionally signeddecimal fixed-point constant and assigned to SALARY.

[0628] Derived from PLINonComputationalType

[0629] PLIEntryType

[0630] Entry data can be an entry constant or the value of an entryvariable.

[0631] An entry constant is a name written as a label prefix to aPROCEDURE or ENTRY statement, or a name declared with the ENTRYattribute and not the VARIABLE attribute, or the name of a mathematicalbuilt-in function.

[0632] An entry constant can be assigned to an entry variable. Forexample:

[0633] P: PROCEDURE;

[0634] DECLARE EV ENTRY VARIABLE,

[0635] (E1,E2) ENTRY;

[0636] EV=E1;

[0637] CALL EV;

[0638] EV=E2;

[0639] CALL EV;

[0640] P, E1, and E2 are entry constants. EV is an entry variable. Thefirst CALL statement invokes the entry point El. The second CALL invokesthe entry point E2.

[0641] The following example contains a subscripted entry reference:

[0642] DECLARE (A,B,C,D,E) ENTRY,

[0643] DECLARE F(5) ENTRY VARIABLE

[0644] INITIAL (A,B,C,D,E);

[0645] DO I=1 TO 5;

[0646] CALL F(I) (X,Y,Z);

[0647] END;

[0648] The five entries A, B, C, D, and E are each invoked with theparameters X, Y, and Z.

[0649] When an entry constant which is an entry point of an internalprocedure is assigned to an entry variable, the assigned value remainsvalid only for as long as the block that the entry constant was internalto remains active (and, for recursive procedures, current).

[0650] ENTRYADDR built-in function and pseudovariable allows you to getor set the address of the entry point of a PROCEDURE or an

[0651] ENTRY in an entry variable. The address of the entry point is theaddress of the first instruction that would be executed if the entrywere invoked. For example:

PTR1=ENTRYADDR(ENTRY_VBL);

[0652] obtains the address of the entry point, and

[0653] ENTRYADDR(ENTRY_VBL)=PTR2;

[0654] Derived from PLINonComputationalType

[0655] Public Attributes:

[0656] Limited: Boolean

[0657] PLIAreaType

[0658] Area variables describe areas of storage that are reserved forthe allocation of based variables. This reserved storage can beallocated to, and freed from, based variables by the ALLOCATE and FREEstatements. Area variables can have any storage class and must bealigned.

[0659] When a based variable is allocated and an area is not specified,the storage is obtained from wherever it is available. Consequently,allocated based variables can be scattered widely throughout mainstorage. This is not significant for internal operations because itemsare readily accessed using the pointers. However, if these allocationsare transmitted to a data set, the items have to be collected together.Items allocated within an area variable are already collected and can betransmitted or assigned as a unit while still retaining their separateidentities.

[0660] You might want to identify the locations of based variableswithin an area variable relative to the start of the area variable.Offset variables are provided for this purpose.

[0661] An area can be assigned or transmitted complete with itscontained allocations; thus, a set of based allocations can be treatedas one unit for assignment and input/output while each allocationretains its individual identity.

[0662] The size of an area is adjustable in the same way as a stringlength or an array bound and therefore it can be specified by anexpression or an asterisk (for a controlled area or parameter) or by aREFER option (for a based area).

[0663] The area size for areas that have the storage classes AUTOMATICor CONTROLLED is given by an expression whose integer value specifiesthe number of reserved bytes.

[0664] If an area has the BASED attribute, the area size must be aninteger unless the area is a member of a based structure and the REFERoption is used.

[0665] The size for areas of static storage class must be specified asan integer.

[0666] Examples of AREA declarations are:

[0667] DECLARE AREA1 AREA(2000),

[0668] AREA2 AREA;

[0669] In addition to the declared size, an extra 16 bytes of controlinformation precedes the reserved size of an area. The 16 bytes containsuch details as the amount of storage in use.

[0670] The amount of reserved storage that is actually in use is knownas the extent of the area. When an area variable is allocated, it isempty, that is, the area extent is zero. The maximum extent isrepresented by the area size. Based variables can be allocated and freedwithin an area at any time during execution, thus varying the extent ofan area.

[0671] When a based variable is freed, the storage it occupied isavailable for other allocations. A chain of available storage within anarea is maintained; the head of the chain is held within the 16 bytes ofcontrol information. Inevitably, as based variables with differentstorage requirements are allocated and freed, gaps occur in the areawhen allocations do not fit available spaces. These gaps are included inthe extent of the area.

[0672] No operators, including comparison, can be applied to areavariables. Derived from PLINonComputationalType

[0673] PLIPointerType

[0674] A pointer variable is declared contextually if it appears in thedeclaration of a based variable, as a locator qualifier, in a BASEDattribute, or in the SET option of an ALLOCATE, LOCATE, or READstatement. It can also be declared explicitly.

[0675] Derived from PLINonComputationalType

[0676] PLIFileType

[0677] The FILE attribute specifies that the associated name is a fileconstant or file variable.

[0678] The FILE attribute can be implied for a file constant by any ofthe file description attributes. A name can be contextually declared asa file constant through its appearance in the FILE option of any inputor output statement, or in an ON statement for any input/outputcondition.

[0679] Derived from PLINonComputationalType

[0680] PLIOffsetType

[0681] You might want to identify the locations of based variableswithin an area variable relative to the start of the area variable.Offset variables are provided for this purpose.

[0682] Derived from PLINonComputationalType

[0683] Public Attributes:

[0684] BigEndian: Boolean=true

[0685] PLIAlias

[0686] An alias is a type name that can be used wherever an explicitdata type is allowed. Using the DEFINE ALIAS statement, you can definean alias for a collection of data attributes. In this way, you canassign meaningful names to data types and improve the understandabilityof a program. By defining an alias, you can also provide a shorternotation for a set of data attributes, which can decrease typographicalerrors.

[0687] Example

[0688] define alias Name char(31) varying;

[0689] define alias Salary fixed dec(7); /* real by default */

[0690] define alias Zip char(5)/* nonvarying by default */

[0691] Derived from PLINamedType

[0692] Attribute

[0693] The attributes that can be specified are any of the attributesfor variables that can be returned by a function (for example, thoseattributes valid in the RETURNS option and attribute). That is, youcannot specify an alias for an array or a structured attribute list.However, you can specify an alias for a type that is defined in a

[0694] DEFINE ORDINAL, or DEFINE STRUCTURE statement or in another

[0695] DEFINE ALIAS statement. Also, as in the RETURNS option andattribute, any string lengths or area sizes must be restrictedexpressions.

[0696] Missing data attributes are supplied using PL/I defaults.

[0697] Public Attributes:

[0698] attribute: String

[0699] PLIOrdinal

[0700] An ordinal is a named set of ordered values. Using the DEFINEORDINAL statement, you can define an ordinal and assign meaningful namesto be used to refer to that set. For example, you can define an ordinalcalled “color”. The “color” ordinal could include the members “red”,“yellow”, “blue”, etc. The members of the “color” set can then bereferred to by these names instead of by their associated fixed binaryvalue, making code much more self-documenting. Furthermore, a variabledeclared with the ordinal type can be assigned and compared only with anordinal of the same type, or with a member of that ordinal type. Thisautomatic checking provides for better program reliability.

[0701] In the following example, Red has the value 0, Orange has thevalue 1, etc. But Low has the value 2 and Medium has the value 3.

[0702] Example

[0703] define ordinal Color (Red, /* is 0, since VALUE is omitted */

[0704] Orange,

[0705] Yellow,

[0706] Green,

[0707] Blue,

[0708] Indigo,

[0709] Violet );

[0710] define ordinal Intensity (Low value(2),

[0711] Medium,

[0712] High value(5));

[0713] Derived from PLINamedType

[0714] Public Attributes:

[0715] precision: int

[0716] isSigned: boolean

[0717] OrdinalValue

[0718] OrdinalValue specifies the value of a particular member withinthe set. If the VALUE attribute is omitted for the first member, a valueof zero is used. If the VALUE attribute is omitted for any other member,the next greater integer value is used.

[0719] The value in the given (or assumed) VALUE attribute must be aninteger, can be signed, and must be strictly increasing. The value inthe given (or assumed) VALUE attributed may also be specified as an XNconstant.

[0720] Example

[0721] define ordinal Intesity (low vcalue(2), middle, high value (5));will give low a value of 2, middle a value of 3, and high a value of 5.

[0722] Public Attributes:

[0723] name: String

[0724] value: int

[0725] PLIStructure

[0726] A structure is a collection of member elements that can bestructure, unions, or elementary variables and arrays.

[0727] Unions are a collection of member elements that overlay eachother, occupying the same storage. Unions can be used to declare variantrecords that typically contain a common part, a selector part, and avariant part

[0728] DEFINE STRUCTURE statement is used to specify a named structureor union. Structures are stronly typed. That is only variables declaredas structures can be assigned to variables or parameters declared asstructures.

[0729] Derived from PLINamedType, PLIComposedType

[0730] PLIHandleType

[0731] use HANDLE to declare a variable as a pointer to a structuretype.

[0732] Handle are strongly typed-they can be assigned to or comparedwith handles for the same structure type

[0733] Derived from PLINonComputationalType

[0734] Public Attributes:

[0735] structure: tPLIStructure

[0736] PLINamedType

[0737] PL/I allows you to define your own named types using the built-indata types. These include user-defined types (aliases,ordinals,structures, and unions), declarations of variables with these types,handles, and type functions.

[0738] Derived from PLIClassifier

[0739] PLIArray

[0740] An array is an n-dimensional collection of elements that haveidenical attributes.

[0741] Examples

[0742] dcl List fixed decimal(3) dimension(8) is a 1 dimensional arraywith 8 fixed-point decimal elements dcl table (4,2) fixed dec (3)

[0743] is a 2 dimensional array of three fixed-point decimal elementsthe 2 dimensions of table have lower bounds of 1 and upper bounds of 4for 1 dimension

[0744] and lower bounds of 1 and upper bounds of 2 for the other

[0745] The REFER option is used in the declaration of a based structureto specify that, on allocation of the structure, the value of anexpression is assigned to a variable in the structure and represents thelength, bound, or size of another variable in the structure. The syntaxfor a length, bound, or size with a REFER option is:

[0746] expression REFER (variable)

[0747] The variable, known as the object of the REFER option, must be amember of the declared structure. The REFER object must conform to thefollowing rules:

[0748] It must be REAL FIXED BINARY(p,0).

[0749] It must precede the first level-2 element that has the REFERoption or contains an element that has the REFER option.

[0750] It must not be locator-qualified or subscripted.

[0751] It must not be part of an array.

[0752] For example:

[0753] DECLARE 1 STR BASED(P),

[0754] 2 X FIXED BINARY,

[0755] 2 Y (L REFER (X)),

[0756] L FIXED BINARY INIT(1000);

[0757] This declaration specifies that the based structure STR consistsof an array Y and an element X. When STR is allocated, the upper boundis set to the current value of L which is assigned to X. For any otherreference to Y, such as a READ statement that sets P, the bound value istaken from X.

[0758] If both the REFER option and the INITIAL attribute are used forthe same member, initialization occurs after the object of the REFER hasbeen assigned its value.

[0759] Any number of REFER options can be used in the declaration of astructure, provided that at least one of the following restrictions issatisfied:

[0760] All objects of REFER options are declared at logical level two,that is, not declared within a minor structure. For example:

[0761] DECLARE 1 STR BASED,

[0762] 2 (M,N),

[0763] 2 ARR(I REFER (M),

[0764] J REFER(N)),

[0765] 2 X;

[0766] When this structure is allocated, the values assigned to I and Jset the bounds of the two-dimensional array ARR.

[0767] The structure is declared so that no padding between members ofthe structure can occur. For example:

[0768] DECLARE 1 STR UNAL BASED (P),

[0769] 2 B FIXED BINARY,

[0770] 2 C,

[0771] 3 D FLOAT DECIMAL,

[0772] 3 E (I REFER (D))

[0773] CHAR(J REFER (B)),

[0774] 2 G FIXED DECIMAL;

[0775] All items require only byte alignment because this structure hasthe UNALIGNED attribute. Therefore, regardless of the values of B and D(the REFER objects) no padding occurs. Note that D is declared within aminor structure.

[0776] If the REFER option is used only once in a structure declaration,the two preceding restrictions can be ignored provided that:

[0777] For a string length or area size, the option is applied to thelast element of the structure.

[0778] For an array bound, the option is applied either to the lastelement of the structure or to a minor structure that contains the lastelement. The array bound must be the upper bound of the leadingdimension. For example:

[0779] DCL 1 STR BASED (P),

[0780] 2 X FIXED BINARY,

[0781] 2 Y,

[0782] 3 Z FLOAT DECIMAL,

[0783] 3 M FIXED DECIMAL,

[0784] 2 D (L REFER (M)),

[0785] 3 E (50),

[0786] 3 F (20);

[0787] The leading dimension of an array can be inherited from a higherlevel. If we had declared STR(4) in the above example, the leadingdimension would be inherited from STR(4) and so it would not be possibleto use the REFER option in D.

[0788] This declaration does not satisfy the two previous bulletedrestrictions. The REFER object M is declared within a minor structureand padding occurs. However, this restriction is satisfied because theREFER option is applied to a minor structure that contains the lastelement.

[0789] The following example is also valid:

[0790] DCL 1 STR BASED(P),

[0791] 2 X FIXED BINARY(31),

[0792] 2 Y,

[0793] 3 Z FLOAT DECIMAL,

[0794] 3 M FIXED BINARY(31),

[0795] 3 N FIXED BINARY(31),

[0796] 2 D,

[0797] 3 E(50),

[0798] 3 F(L REFER (M))

[0799] CHAR(K REFER (N));

[0800] If the value of the object of a REFER option varies during theprogram then:

[0801] The structure must not be freed until the object is restored tothe value it had when allocated.

[0802] The structure must not be written out while the object has avalue greater than the value it was allocated.

[0803] The structure can be written out when the object has a valueequal to or less than the value it had when allocated. The number ofelements, the string length, or area size actually written is thatindicated by the current value of the object. For example:

[0804] DCL 1 REC BASED (P),

[0805] 2 N,

[0806] 2 A (M REFER(N)),

[0807] M INITIAL (100);

[0808] ALLOCATE REC;

[0809] N=86;

[0810] WRITE FILE (X) FROM (REC);

[0811] 86 elements of REC are written. It would be an error to attemptto free REC at this point, since N must be restored to the value it hadwhen allocated (that is, 100). If N is assigned a value greater than100, an error occurs when the WRITE statement is encountered.

[0812] When the value of a refer object is changed, the next referenceto the structure causes remapping. For example:

[0813] DCL 1 A BASED(P),

[0814] 2 B,

[0815] 2 C (I REFER(B)),

[0816] 2 D,

[0817] I INIT(10);

[0818] ALLOCATE A;

[0819] B=5;

[0820] The next reference to A after the assignment to B remaps thestructure to reduce the upper bound of C from 10 to 5, and to allocateto D storage immediately following the new last element of C. Althoughthe structure is remapped, no data is reassigned—the contents of thepart of storage originally occupied by the structure A are unchanged. Ifyou do not consider remapping, errors can occur. Consider the followingexample, in which there are two REFER options in the one structure:

[0821] DCL 1 A BASED (P),

[0822] 2 B FIXED BINARY (15,0),

[0823] 2 C CHAR (I1 REFER (B)),

[0824] 2 D FIXED BINARY (15,0),

[0825] 2 E CHAR (I2 REFER (D)),

[0826] (I1,I2) INIT (10);

[0827] ALLOCATE A;

[0828] B=5;

[0829] The mapping of A with B=10 and B=5, respectively, is as follows:

[0830]  D now refers to data that was originally part of that assignedto the character-string variable C. This data is interpreted accordingto the attributes of D—that is, as a fixed-point binary number—and thevalue obtained is the length of E. Hence, the length of E isunpredictable.

[0831] PLIFixedLengthString

[0832] Derived from PLICodedStringType

[0833] Public Attributes:

[0834] length: Integer

[0835] PLIVariableLengthString

[0836] Derived from PLICodedStringType

[0837] Public Attributes:

[0838] lengthToAllocate: String

[0839] PLIFixedLengthArea

[0840] Derived from PLIAreaType

[0841] Private Attributes:

[0842] length: Integer

[0843] PLIVariableLengthArea

[0844] The size of an area is adjustable in the same way as a stringlength or an array bound and therefore it can be specified by anexpression or an asterisk (for a controlled area or parameter) or by aREFER option (for a based area).

[0845] Derived from PLIAreaType

[0846] Private Attributes:

[0847] lengthToAllocate: String

[0848] PLIFixedBoundArray

[0849] Derived from PLIArray

[0850] Public: Attributes:

[0851] lbound: Integer

[0852] ubound: Integer

[0853] PLIFixedLboundArray

[0854] Derived from PLIArray

[0855] Public Attributes:

[0856] Ibound: Integer

[0857] HboundtoAllocate: String

[0858] PLIHboundArray

[0859] Derived from PLIArray

[0860] Public Attributes:

[0861] LboundtoAllocate: String

[0862] ubound: Integer

[0863] PLIVariableBoundArray

[0864] Derived from PLIArray

[0865] Public Attributes:

[0866] LboundToAllocate: String

[0867] HboundToAllocate: String

[0868] TOTALS:

[0869] 1 Logical Packages

[0870] 39 Classes

[0871] LOGICAL PACKAGE STRUCTURE

[0872] Logical View

[0873] PLI

[0874] TDLang

[0875] 6. Illustrative Applications of the Common Application Metamodeland System

[0876] Various complex transaction, occurring across a plurality ofindividual platforms require the seamlessness and transparency of theCommon Application Metamodel. These transactions include “rich”transactions, high level group ware, and financial transactions.

[0877]FIG. 16 illustrates a simplified network configuration for a“rich” transaction where, for example, an order is entered at aterminal, and is passed to and through a Web server to a manufacturer'sapplication server. The manufacturer's application server searchesthrough it's own database server, as well as its vendors' dissimilar andincompatible database servers and databases, transparently connected bythe connectors described herein, querying for statuses, prices, anddelivery dates, of components, and placing orders for needed componentsto satisfy the order.

[0878] Strictly for purposes of illustration and not limitation, a richtransaction is illustrated with the purchase of an automobile, fromconfiguring and ordering the new automobile through financing theautomobile, collecting the elements and components the new automobile,assembling the automobile, and delivering it to the customer. Inconfiguring the automobile, consider the inclusion of, e.g., a tractioncontrol module, which may require the inclusion of one sub-set ofengines, while precluding the inclusion of another sub-set of engines,for example, for technical or performance reasons. Similarly, theselection of one color may preclude the selection of certain upholsterycombinations, for example, for reasons of inventory or availability. Ofcourse, if you don't select an engine and a transmission, you don't havean automobile. Certain choices must be made. The problem is one of “Ifyou pick ‘X’, you must also pick ‘Y’ and ‘Z’, but if you pick ‘Y’, youcan not get ‘A’ or ‘B’, and you have already selected ‘A’.” That is,selection of one component or sub-system may remove some previouslyselected components or sub-systems from the system. After configuringthe car, frequently based on the availability of selected elements inthe supply pipeline, the order is sent to the manufacturer's server forfulfillment, including manufacturing scheduling. The manufacturer wouldquery the vendors in the supply chain, for example, a transmissionvendor, who would, in turn, query controller vendors, gear vendors,housing vendors, hydraulic conduit vendors, and the like. These vendorswould, in turn query their sub-vendors.

[0879] Using the connector method and system, the dealer and customerwould configure and order the car at a terminal 3901. The configurationand order entry would be sent to the manufacturer's server 3911. Themanufacturer's server queries the servers 3921, 3931, and 3441, (whereserver 3921 could be the server for the manufacturer's in housecomponents business and for its purchasing function) or its directvendors, who in turn query third sub-vendors, 3923, 3933, and 3933. Thequeries could be in the form of “fill in the blank” SQL queries, subjectto access authorizations. The sub-vendor servers, 3923, 3933, and 3443specialized views to the vendor's servers 3921, 3931, 3441, as clients,which in turn would present specialized views to the manufacturer'sserver 3911 as a client. The data returned to the manufacturer's server3911 could be optimized with optimization and production schedulingapplications, to present a serial number and delivery date to the buyerat the dealer's server.

[0880] A further application of the connectors of the present inventionis in connection with groupware, and especially linking “islands ofgroupware” together. “Groupware” is a broad term applied to technologythat is designed to facilitate the work of groups. Groupware technologymay be used to communicate, cooperate, coordinate, solve problems,compete, or negotiate. A Groupware suite of applications is comprised ofprograms that help people work together collectively, even if locatedremotely from each other. Groupware services can include the sharing ofcalendars, collective writing, e-mail handling, shared database access,electronic meetings, video conferencing, and other activities.

[0881]FIG. 17 illustrates a group ware session spread across multiplegroup ware applications running on multiple, disparate platforms, andconnected by the connectors described herein. Specifically illustratedare two groupware systems 4010 and 4020. Each system contains e-mailenables applications, 4013 and 4023, such as e-mail, schedule/calendar,word processor, spread sheet, graphics, and CTI (computer telephonyintegration). These are supported by message API's 4015, 4025 andoperating systems, 4017 and 4027, and local groupware servers 4011 and4021. Each of the local groupware servers, 4011 and 4021, has aconnector of the present invention, an e-mail server, an e-mail database, a directory server, and a replication database. The two groupwareservers 4011 and 4021 communicate over a telecommunications medium, asthe Net, a LAN, a WAN, or even the PSTN.

[0882] E-mail is by far the most common and basic groupware application.While the basic technology is designed to pass simple messages betweenpeople, even relatively simple e-mail systems today typically includefeatures for forwarding messages, filing messages, creating mailinggroups, and attaching files with a message. Other features that havebeen explored include content based sorting and processing of messages,content based routing of messages, and structured communication(messages requiring certain information).

[0883] Workflow systems are another element of groupware. Work flowsystems allow documents to be routed through organizations through arelatively-fixed process. A simple example of a workflow application isan expense report in an organization: an employee enters an expensereport and submits it, a copy is archived then routed to the employee'smanager for approval, the manager receives the document, electronicallyapproves it and sends it on and the expense is registered to the group'saccount and forwarded to the accounting department for payment. Workflowsystems may provide features such as routing, development of forms, andsupport for differing roles and privileges.

[0884] Hypertext is a system for linking text documents to each other,with the Web being an obvious example. However, whenever multiple peopleauthor and link documents, the system becomes group work, constantlyevolving and responding to others' work. Another common multi-userfeature in hypertext (that is not found on the Web) is allowing any userto create links from any page, so that others can be informed when thereare relevant links that the original author was unaware of.

[0885] Group calendaring is another aspect of groupware and facilitatesscheduling, project management, and coordination among many people, andmay provide support for scheduling equipment as well. Typical featuresdetect when schedules conflict or find meeting times that will work foreveryone. Group calendars also help to locate people.

[0886] Collaborative writing systems may provide both realtime supportand non-realtime support. Word processors may provide asynchronoussupport by showing authorship and by allowing users to track changes andmake annotations to documents. Authors collaborating on a document mayalso be given tools to help plan and coordinate the authoring process,such as methods for locking parts of the document or linkingseparately-authored documents. Synchronous support allows authors to seeeach other's changes as they make them, and usually needs to provide anadditional communication channel to the authors as they work.

[0887] Group may be synchronous or real time, such as shared whiteboardsthat allow two or more people to view and draw on a shared drawingsurface even from different locations. This can be used, for instance,during a phone call, where each person can jot down notes (e.g. a name,phone number, or map) or to work collaboratively on a visual problem.Most shared whiteboards are designed for informal conversation, but theymay also serve structured communications or more sophisticated drawingtasks, such as collaborative graphic design, publishing, or engineeringapplications. Shared whiteboards can indicate where each person isdrawing or pointing by showing telepointers, which are color-coded orlabeled to identify each person.

[0888] A further aspect of groupware is video conferencing. Videoconferencing systems allow two-way or multi-way calling with live video,essentially a telephone system with an additional visual component, withtime stamping for coordination.

[0889] Decision support systems are another aspect of groupware and aredesigned to facilitate groups in decision-making. They provide tools forbrainstorming, critiquing ideas, putting weights and probabilities onevents and alternatives, and voting. Such systems enable presumably morerational and evenhanded decisions. Primarily designed to facilitatemeetings, they encourage equal participation by, for instance, providinganonymity or enforcing turn-taking.

[0890] Multi-player games have always been reasonably common in arcades,but are becoming quite common on the Internet. Many of the earliestelectronic arcade games were multi-user, for example, Pong, Space Wars,and car racing games. Games are the prototypical example of multi-usersituations “non-cooperative”, though even competitive games requireplayers to cooperate in following the rules of the game. Games can beenhanced by other communication media, such as chat or video systems.

[0891] Some product examples of groupware include Lotus Notes andMicrosoft Exchange, both of which facilitate calendar sharing, e-mailhandling, and the replication of files across a distributed system sothat all users can view the same information.

[0892] What makes the connectors of the present invention particularlyattractive for groupware applications is the diversity of groupwareofferings and group server architectures, implementations, andplatforms. The connector of the invention can act as a front end orgateway to the groupware server.

[0893]FIG. 18 illustrates a commercial transaction where real goods areshipped from a seller to a buyer, and various forms of electronicpayment and secured electronic payment are used by the buyer to pay theseller, with banks and financial institutions connected through theconnectors described herein. Specifically, a merchant or manufacturer4101 sells a product to a customer 4103 that he has no “history” with.The product is shipped 4605. However, the buyer 4103 does not wish to beparted from his money until the goods are received, inspected, approved,and “accepted”, while the seller 4101 does not want to give up controlof the goods until he has been paid. This fundamental commercialconflict has led to various paradigms, most involving hard copy “nearmoneys” or instruments of one form or another. Today, the financialtransactions are most frequently those involving electronic fundtransfers, and electronic versions of notes, instruments, negotiableinstruments, documentary drafts, payment orders, letters of credit,warehouse receipts, delivery orders, bills of lading, including claimson goods, that is, documents of title that purport to transfer title orphysical custody of goods to the bearer or to a named person, andsecurity interests in goods. Typically, the customer 4103 executes aninstrument in favor of the seller 4101, directing the buyer's bank 4121to pay buyer's money to the seller 4101 through seller's bank 4125.Normally, this is a simple electronic transaction between buyers andsellers who have dealt with each other before, dealing through banks orfinancial intermediaries who have dealt with each other before, and whoare using the same or compatible software applications. However, in theextraordinary case where these preconditions are not satisfied, theconnectors of the invention facilitate the electronic, bank-to-bank,side of the transaction.

[0894] While the invention has been described and illustrated withrespect to applications having a single level of application programinterfaces or converters, it is, of course, to be understood that suchapplication program interfaces or converters may be present at variouslevels in the processing hierarchy, for example between Web Clients andWeb servers, between web servers and application servers, betweenapplication servers and database servers, and between applicationservers or database servers or both and various specializedrepositories.

[0895] It is also to be understood, that while the invention has beendescribed and illustrated with respect to certain preferred embodimentsand exemplification having individual clients and individual servers,there may be multiple clients, multiple servers, and applications thatfunction as both clients and servers, as exemplified by groupwareapplications, and there might be multiple parallel lines and/or multiplehierarchical levels of application servers, data servers, and databases,as in systems for rich transactions.

[0896] While the invention has been described with respect to certainpreferred embodiments and exemplifications, it is not intended to limitthe scope of the invention thereby, but solely by the claims appendedhereto.

We claim:
 1. A method of processing an application request on an enduser application and an application server comprising the steps of: a)initiating the application request on the end user application in afirst language with a first application program; b) transmitting theapplication request to the server and converting the application requestfrom the first language of the first end user application to PL/Irunning on the application server; c) processing said applicationrequest on the application server; d) transmitting a response to theapplication request from the application server to the end userapplication, and converting the response to the application request fromPL/I running on the application server to the first language of thefirst end user application; and e) wherein the end user application andthe application server have at least one connector therebetween, and thesteps of (i) converting the application request from the first languageof the first end user application as a source language to the PL/Irunning on the application server as a target language, and (ii)converting a response to the application request from the PL/I runningon the application server as a source language to the first language ofthe first end user application as a target language, each comprise thesteps of: 1) invoking connector metamodels of respective source and PL/Itarget languages; 2) populating the connector metamodels with metamodeldata of each of the respective source and PL/I target languages; and 3)converting the source language to the PL/I arget language.
 2. The methodof claim 1 wherein the end user application is a web browser.
 3. Themethod of claim 2 wherein the end user application is connected to theapplication server through a web server, and the web server comprises anconnector.
 4. The method of claim 1 wherein the metamodel metadatacomprises invocation metamodel metadata, application domain interfacemetamodel metadata, and type descriptor metamodel metadata.
 5. Themethod of claim 4 wherein the invocation metamodel metadata is chosenfrom the group consisting of message control information, security data,transactional semantics, trace and debug information, pre-condition andpost-condition resources, and user data.
 6. The method of claim 4wherein the application domain interface metamodel metadata comprisesinput parameter signatures, output parameter signatures, and returntypes.
 7. The method of claim 4 wherein the application domain interfacemetamodel metadata further includes language metamodel metadata.
 8. Themethod of claim 7 wherein the language metamodel metadata includesmappings between source and target languages.
 9. The method of claim 8wherein the source language is object oriented, and the languagemetamodel metadata maps encapsulated objects into code and data.
 10. Themethod of claim 9 wherein the language metamodel metadata maps objectinheritances into references and pointers
 11. The method of claim 4wherein the type descriptor metamodel metadata defines physicalrealizations, storage mapping, data types, data structures, andrealization constraints.
 12. The method of claim 1 wherein thetransaction is a rich transaction comprising a plurality of individualtransactions, and further comprising processing the plurality ofindividual transactions on one end user application and a plurality ofapplication servers.
 13. The method of claim 12 comprising passingindividual transactions among individual application servers.
 14. Atransaction processing system comprising a client, a server, and atleast one connector therebetween, a) the client having an end userapplication, and being controlled and configured to initiate anapplication request with the server in a first language with a firstapplication program and to transmit the application request to theserver; b) the connector being configured and controlled to receive theapplication request from the client, convert the application requestfrom the first language of the first end user application running on theclient to PL/I language running on the server; c) the server beingconfigured and controlled to receive the converted application requestfrom the connector and processing the said application request in PL/Ilanguage with a second application program residing on the server, andto thereafter transmit a response to the application request through theconnector back to the first application program on the client; d) theconnector being configured and controlled to receive a response to theapplication request from the server, to convert a response to theapplication request from the PL/I language running on the applicationserver to the first language of the first application program running onthe client; and e) wherein connector between the client and the serveris configured and controlled to (i) convert the application request fromthe first language of the client application on the client as a sourcelanguage to the PL/I language running on the application server as atarget language, and (ii) convert the response to the applicationrequest from the PL/I language running on the application server as asource language to the first language of the client application runningon the client as a target language, each by a method comprising thesteps of: 1) retrieving connector metamodels of respective source andtarget languages from a metamodel metadata repository; 2) populating theconnector metamodels with metamodel data from the metamodel metadatarepository for each of the respective source and target languages; and3) invoking the retrieved, populated connector metamodels and convertingthe source language to the target language.
 15. The system of claim 14wherein the end user application is a web browser.
 16. The system ofclaim 15 wherein the end user application is connected to theapplication server through a web server, and the web server comprises anconnector.
 17. The system of claim 14 wherein the metamodel metadatacomprises invocation metamodel metadata, application domain interfacemetamodel metadata, and type descriptor metamodel metadata.
 18. Thesystem of claim 17 wherein the invocation metamodel metadata is chosenfrom the group consisting of message control information, security data,transactional semantics, trace and debug information, pre-condition andpost-condition resources, and user data.
 19. The system of claim 17wherein the application domain interface metamodel metadata comprisesinput parameter signatures, output parameter signatures, and returntypes.
 20. The system of claim 17 wherein the application domaininterface metamodel metadata further includes language metamodelmetadata.
 21. The system of claim 20 wherein the language metamodelmetadata includes mappings between source and target languages.
 22. Thesystem of claim 23 wherein the source language is object oriented, andthe language metamodel metadata maps encapsulated objects into code anddata.
 23. The system of claim 22 wherein the language metamodel metadatamaps object inheritances into references and pointers
 24. The system ofclaim 18 wherein the type descriptor metamodel metadata defines physicalrealizations, storage mapping, data types, data structures, andrealization constraints.
 25. The system of claim 14 wherein said systemhas a plurality of application servers and is configured and controlledto process rich transactions.
 26. A transaction processing systemconfigured and controlled to interact with a client application, andcomprising a PL/I server, and at least one connector between the serverand the client application, where the client has an end userapplication, and is controlled and configured to initiate an applicationrequest with the server in a first language with a first applicationprogram and to transmit the application request to the server, wherein:a) the connector being configured and controlled to receive anapplication request from the client, convert the application requestfrom the first language of the first end user application running on theclient to the PL/I language running on the server; b) the server beingconfigured and controlled to receive the converted application requestfrom the connector and process the said application request in the PL/Ilanguage with a second application program residing on the server, andto thereafter transmit a response to the application request through theconnector back to the first application program on the client; c) theconnector being configured and controlled to receive the applicationrequest from the server, to convert a response to the applicationrequest from the PL/I language running on the application server to thefirst language of the first application program running on the client;and d) wherein connector between the client and the server is configuredand controlled to (i) convert the application request from the firstlanguage of the client application on the client as a source language tothe PL/I language running on the application server as a targetlanguage, and (ii) convert the response to the application request fromthe PL/I language running on the application server as a source languageto the first language of the client application running on the client asa target language, each by a method comprising the steps of: 1)retrieving connector metamodel metadata of respective source and targetlanguages from a metamodel metadata repository; 2) populating theconnector metamodels with metamodel data of each of the respectivesource and target languages from the metamodel metadata repository andinvoking the retrieved, populated connector metamodels; and 3)converting the source language to the target language.
 27. The system ofclaim 26 wherein the end user application is a web browser.
 28. Thesystem of claim 27 wherein the end user application is connected to theapplication server through a web server, and the web server comprises anconnector.
 29. The system of claim 26 wherein the metamodel metadatacomprises invocation metamodel metadata, application domain interfacemetamodel metadata, and type descriptor metamodel metadata.
 30. Thesystem of claim 29 wherein the invocation metamodel metadata is chosenfrom the group consisting of message control information, security data,transactional semantics, trace and debug information, pre-condition andpost-condition resources, and user data.
 31. The system of claim 29wherein the application domain interface metamodel metadata comprisesinput parameter signatures, output parameter signatures, and returntypes.
 32. The system of claim 29 wherein the application domaininterface metamodel metadata further includes language metamodelmetadata.
 33. The system of claim 32 wherein the language metamodelmetadata includes mappings between source and target languages.
 34. Thesystem of claim 33 wherein the source language is object oriented, andthe language metamodel metadata maps encapsulated objects into code anddata.
 35. The method of claim 33 wherein the source language and thetarget language are different object oriented languages, and thelanguage metamodel metadata maps encapsulated code and data between thelanguages.
 36. The system of claim 33 wherein the language metamodelmetadata maps object inheritances into references and pointers
 37. Thesystem of claim 29 wherein the type descriptor metamodel metadatadefines physical realizations, storage mapping, data types, datastructures, and realization constraints.
 38. The system of claim 26wherein said system has a plurality of application servers and isconfigured and controlled to process rich transactions.
 39. A programproduct comprising a storage medium having invocation metamodelmetadata, application domain interface metamodel metadata, and languagemetamodel metadata, and computer instructions for building a metamodemetadata repository of source and PL/I target language metamodelmetadata.
 40. The program product of claim 39 further comprisingcomputer instructions for building connector stubs from said metamodelmetadata.
 41. The program product of claim 39 further comprisingcomputer instructions to build a connector for carrying out the stepsof: 1) retrieving connector metamodel metadata of respective source andtarget languages from the metamodel metadata repository; 2) populatingthe connector metamodels with metamodel data of each of the respectivesource and target languages from the metamodel metadata repository andinvoking the retrieved, populated connector metamodels; and 3)converting the source language to the target language.
 42. The programproduct of claim 41 wherein the metamodel metadata in the repositorycomprises invocation metamodel metadata, application domain interfacemetamodel metadata, and type descriptor metamodel metadata.
 43. Theprogram product of claim 42 wherein the invocation metamodel metadata ischosen from the group consisting of message control information,security data, transactional semantics, trace and debug information,pre-condition and post-condition resources, and user data.
 44. Theprogram product of claim 42 wherein the application domain interfacemetamodel metadata comprises input parameter signatures, outputparameter signatures, and return types.
 45. The program product of claim42 wherein the application domain interface metamodel metadata furtherincludes language metamodel metadata.
 46. The program product of claim45 wherein the language metamodel metadata includes mappings betweensource and target languages.
 47. The program product of claim 46 whereinthe source is object oriented, and the language metamodel metadata mapsencapsulated objects into code and data.
 48. The program product ofclaim 46 wherein the language metamodel metadata maps objectinheritances into references and pointers.
 49. The program product ofclaim 43 wherein the type descriptor metamodel metadata defines physicalrealizations, storage mapping, data types, data structures, andrealization constraints.